Click to See Complete Forum and Search --> : How to display a Modeless Form ?


M.Anand
January 11th, 1999, 12:45 AM
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

M.Anand
January 11th, 1999, 01:26 AM
Form.Show allows me to specify whether I want Modal or Modeless . But still it doesn't work

Any Clue ?

wael
January 14th, 1999, 05:10 AM
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

Girish
January 18th, 1999, 10:52 AM
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.