How to display a Modeless Form ?
I have a form displayed ( Form 1) . On Right Click I am displaying another form ( Form 2) . Now when I shift my focus to Form1 I want Form2 to remain Visible but not active ( something like Properties Window ) .
How do I do it ?
Thanks in advance
Anand
Re: How to display a Modeless Form ?
Hello ,
'/**************************************/
this code display modless form with focus
1-add module to project
2-Declare this api function to module
Public Declare Function BringWindowToTop Lib "user32" (ByVal hwnd As Long) As Long
'/**************************************/
3-add this code to command or menue :
'/**************************************/
a-
Private Sub wael()
' if you decide to load it without parent
Form1.Show 0
BringWindowToTop (Form1.hwnd)
End Sub
'/**************************************/
b-
Private Sub wael()
' if you decide to load it with parent form named MDIForm1
Form1.Show 0 , MDIForm1
BringWindowToTop (Form1.hwnd)
End Sub
'/**************************************/
WAEL FAROUK AHMED
Re: How to display a Modeless Form ?
Set the property style of the form2 as ToolWindow (ToolBox).
Show form one.
On right click show form2
Suddenly you change the focus to form1
That's all....
Girish
Project Manager
GuildSoft Pvt. Ltd.