borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Link Forms together)Next Topic (Password detector) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Problem Z-Ording the Winow [ SetWindowPos() ]
Poster Message
Dhananjayan
Level: Trainee

Registered: 08-09-2005
Posts: 2

icon Problem Z-Ording the Winow [ SetWindowPos() ]

I have a problem regarding to my Application. The requirement is to display the window to the top of the Z-Order of the Windows. So I use SetWindowPos() method for it. But the Problem is that the windows does not become active programatically. It is an MFC application.

::ShowWindow( m_hWnd, SW_RESTORE );
::SetWindowPos( m_hWnd,HWND_TOPMOST,0,0,0,0,   SWP_NOSIZE|SWP_NOREPOSITION );
            
::SetWindowPos( m_hWnd,HWND_NOTOPMOST,0,0,0,0,  SWP_NOSIZE|SWP_NOREPOSITION );
::SetFocus    ( m_hWnd);
::SetActiveWindow( m_hWnd );


____________________________
Dhana

08-09-2005 at 01:32 PM
View Profile Send Email to User Show All Posts Visit Homepage ICQ | Quote Reply
stickleprojects
Level: Moderator


Registered: 09-09-2002
Posts: 891
icon Re: Problem Z-Ording the Winow [ SetWindowPos() ]

Hi,
2 things
1) andreaVB vb posts will probably not be answered for an MFC issue
2) try using sendmessage WM_ACTIVATE with the hwnd of the window to activate
hope this helps
Kieron


____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)

24-09-2005 at 02:01 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : Problem Z-Ording the Winow [ SetWindowPos() ]
Previous Topic (Link Forms together)Next Topic (Password detector) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder