|
-
Apr 22nd, 2013, 09:58 AM
#1
Thread Starter
Lively Member
Multi Tasking issue
Hello everyone once again 
I am working on a project in which I need to do multiple task on multiple forms.
Let me try to explain it with a simple example.
My projects has 2 forms i.e. Form1 and Form2 respectively.
In Form1 i've coded:
Code:
Private Sub Form_Load()
Form2.Show
MsgBox "Click me to continue", vbCritical, "I am a bug"
End Sub
Code:
In Form2 i've coded in a timer:
Private Sub Timer1_Timer()
Me.Caption = TimeValue(Now)
End Sub
Now when I execute Form1.. Form2 appears and a message box(which I've coded).
The issue is Form2's Timer getting paused untill I click the OK button of the messagebox..
I want my application which can perform multiple task. like in the above example I want Form2's timer keep working even if message box is appearing or not...
In the project multiple forms ar doing multiple task.
I hope you are understanding..and would like to show me the way to do this..
Thanks!
Regards,
-
Apr 22nd, 2013, 10:00 AM
#2
Re: Multi Tasking issue
Moved From The CodeBank (which is for sharing code rather than posting questions )
-
Apr 22nd, 2013, 10:26 AM
#3
Re: Multi Tasking issue
In the IDE, the Timer event won't fire when a MsgBox is being displayed. In a compiled exe, the Timer event runs independently of any MsgBox.
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)
-
Apr 22nd, 2013, 01:06 PM
#4
Thread Starter
Lively Member
Re: Multi Tasking issue
Thank you from the bottom of my heart Bonnie West, I'm shocked why dint't I think about it.
Regards,
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
|