Results 1 to 4 of 4

Thread: Multi Tasking issue

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2012
    Posts
    106

    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,

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Multi Tasking issue

    Moved From The CodeBank (which is for sharing code rather than posting questions )

  3. #3
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    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)

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2012
    Posts
    106

    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
  •  



Click Here to Expand Forum to Full Width