Solved

Popup a non-modal dialog

Posted on 2008-06-26
4
447 Views
Last Modified: 2008-07-23
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.
0
Comment
Question by:cplau
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 21872801
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()
Form2.Hide
Timer1.Enabled = False
 
End Sub

Open in new window

0
 
LVL 13

Expert Comment

by:jmundsack
ID: 21873702
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

0
 

Author Comment

by:cplau
ID: 21881221
Hi All,

How can I ensure that this non-modal dialog will be shown on top of all windows?
0
 
LVL 13

Accepted Solution

by:
jmundsack earned 125 total points
ID: 22029451
This is exactly what you need:

How To Create a Form That Always Stays on Top
http://support.microsoft.com/kb/q184297/
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question