|
-
March 16th, 2001, 01:50 PM
#1
Counting while a msgbox is active
I have two counters that runs using a timer. So according to the timer Interval the counter goes up. I print an error message(using MsgBox) when the first counter reaches say 100. But until I close the message the second count won't count. How do I increment the second counter when the message box is stile active?
-
March 16th, 2001, 01:58 PM
#2
Re: Counting while a msgbox is active
Try DoEvents.
If that doesn't work then display your message in a Label with a beep, or pop up your own form that you create (simulate the MsgBox).
-
March 16th, 2001, 03:48 PM
#3
Re: Counting while a msgbox is active
-
March 16th, 2001, 09:05 PM
#4
Re: Counting while a msgbox is active
use the timeGetTime() API function to get the time before and after MsgBox(). The difference between these two values will give you the time elapsed in milliseconds. You can divide this value by the time interval to get the count.
-
March 20th, 2001, 06:59 AM
#5
Re: Counting while a msgbox is active
The message box command suspends the thread calling it - exactly as would be the case if you loaded a modal form.
The timer will not be triggered, and the code after the messagebox will not be executed until the messagebox is closed.
HTH,
Duncan
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
-
March 21st, 2001, 12:48 AM
#6
Re: Counting while a msgbox is active
I think you need modeless dialog box
try
http://vblib.virtualave.net
there got a function ShowMessageBox & HideMessageBox in the vbGeneralControl class which might help.
-
March 22nd, 2001, 02:13 AM
#7
Re: Counting while a msgbox is active
When you run the program in visual basic environment, msgbox stops the timer but when you run the exe file msgbox don't stop the timer unless the msgbox is inside the timer routine.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|