Popup a non-modal dialog

Hi All,

My application has a main interface developed by VB6.0. Is it possible to pop up a non-modal dialog under certian conditions? And this non-modal dialog will disappear automatically after 1 minute.

Please advise. Thanks.
Who is Participating?
jmundsackConnect With a Mentor Commented:
This is exactly what you need:

How To Create a Form That Always Stays on Top
Just use a Form, and use a timer to hide it.
Option Explicit
Private Sub Command1_Click()
Form2.Show vbModeless
Me.Timer1.Interval = 2000
Me.Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Timer1.Enabled = False
End Sub

Open in new window

And -- if you want to force the non-modal dialog to stay "on-top" of your main program window, do what GrahamSkan said but add the name of the main program window to the Show command:

Form2.Show vbModeless, Form1

If the above line of code is being executed from within Form1, you could also use:

Form2.Show vbModeless, Me

cplauAuthor Commented:
Hi All,

How can I ensure that this non-modal dialog will be shown on top of all windows?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.