CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Location
    G day Mayt Land
    Posts
    971

    A window of a folder is open or not

    I m not sure if going through the processes in the taskmanger is going to help me with this but this is something i want to do and before i start to try a few things thought pop that question in here and make my life easier:

    If there are several windows opened how can you tell if a window showing
    the content of a folder is open or not (maximised , minimised ,..)

    & if it is how do you Set the focus on that window once its found?

    Cheers

  2. #2
    Join Date
    Dec 2008
    Location
    Step Into(F11)
    Posts
    465

    Smile Re: A window of a folder is open or not

    Try the following Way .
    Code:
     
     Collapse | Copy Code
    //...
    #ifndef __FOLDERDLG_H__
        #include "FolderDlg.h"
    #endif
    // ...
    void CSomeDialog::OnSomeHandler( void ) 
    { 
        m_strFolderPath = _T( "d:\\Windows" ); // Just for sample    
        m_strDisplayName.Empty();
        
        CFolderDialog dlg(  _T( "Dialog Title" ), m_strFolderPath, this );
        if( dlg.DoModal() == IDOK  )
        {    
            m_strFolderPath  = dlg.GetFolderPath();
            m_strDisplayName = dlg.GetFolderDisplayName();
            // Use folder path and display name here ...
        }    
    }

  3. #3
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: A window of a folder is open or not

    Quote Originally Posted by firoz.raj View Post
    Try the following Way .
    Code:
     
     Collapse | Copy Code
    //...
    #ifndef __FOLDERDLG_H__
        #include "FolderDlg.h"
    #endif
    // ...
    void CSomeDialog::OnSomeHandler( void ) 
    {
    Sorry firoz, but this is not C# !!

    Saeed:
    Are you trying to catch Folders of the directory and wanting to know if they are visible on the screen ?
    Whats the purpose of that can you tell a bit more about what you want to achieve
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured