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
Solved

Popup a non-modal dialog

Posted on 2008-06-26
4
445 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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA filters 2 64
Access Object Property from VBA Module in Excel 2010 2 37
Powerpoint 2013: Change cell reference in excel link 3 80
Dinamic report to Crosstab query 9 33
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

856 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