CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    57

    How do I make two Forms running at a time ?



    I have some process happening in Form1 and I want to display another form above this form.This is similar to the Task Manager. When I kill a process , the Clock Screen appears and at the same time the Process is killed.


    If I try to start or stop a service and at the same time try to run a modeless form above that,I couldn't accomplish both at the same time


    This is the code


    Form2.Timer.Enabled = True

    Form2.Timer.Interval = 500


    Form1.StartService()


    // Stop the Timer


    Form2_Timer

    {


    // Keep changing the Clock Images


    }


    BUT the Timer doesn't happen until StartService function is returned


    Thanks

    Anand



  2. #2
    Join Date
    May 1999
    Posts
    45

    Re: How do I make two Forms running at a time ?



    If I understand correctly u'r running a lengthy process in Form1. Form2 has a timer control with timer event doing some GUI work.

    If this is correct then solution is simple.

    Solution 1 : In StartService after every one or two statements add doevnts statement. This allows all Forms to refresh.

    Solution2 : Do it hardway run StartService in another thread.




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

Featured