Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Show Non-modal form from Modal form?

Status
Not open for further replies.

VenkatY

Programmer
Apr 24, 2000
15
US
Hi All,

I need some help on how to show a non-modal form from a modal form?
I need to show a Non-modal form when a button click event fires on a modal form?

If i use in Vb "frmxyz.show" i am getting an error, can not show a non-modal window from a modal window.

And also i did try to use the APIs of ShowWindow and SetWindowPOS. With the APIs i am able to show the form but is acting like "Always on Top". Is there any thing that i miss when i use the APIs?
Or Is there any other way that i can achieve this functionality?

Thanks in Advance,
 

The only way I can think of is to show the second form modally (is that a word?).
[tt]
Option Explicit

Private Sub Command1_Click()
Dim F As Form
Set F = New Form1
F.Show vbModal, Me
End Sub
[/tt]

With this little example you can keep showing modal forms one on top of the other.

Good Luck

 
vb5prgrmr --> modally (is that a word?).

It is now. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Hi Vb5prgrmr,
Thanks for reply.
The current application has this feature i.e.calling second form modally only. But now i want this to call it as non-modally. So that the users can keep this form and Verify the data on this form with the parent form.

thanks
venkat
 
Sorry you need to scroll down the page I posted where you will find "Accepted Answer" with a green background that will work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top