Re: Stopping program execution in another thread
From: Bob (anonymous_at_discussions.microsoft.com.invalid)
Date: 05/18/04
- Next message: alpine: "Re: Copy menu to another form"
- Previous message: Duane Bozarth: "Re: Format of a file"
- In reply to: Dave: "Re: Stopping program execution in another thread"
- Next in thread: Dave: "Re: Stopping program execution in another thread"
- Reply: Dave: "Re: Stopping program execution in another thread"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 18 May 2004 12:10:59 -0700
I assume from your comments, and reading the articles, it can not easily be
done, and I am better off using the loop, and doevents. is this correct?
Bob
"Dave" <noone@nowhere.com> wrote in message
news:%23WxXy$EPEHA.3052@TK2MSFTNGP09.phx.gbl...
> well, it ain't pretty... try reading these articles in the msdn library
> under visual basic concepts:
> Apartment-Model Threading in Visual Basic
> Creating a Multithreaded Test Application
> Scalability and Multithreading
>
> they include discussion of the limitations and sample code.
>
>
> "Bob" <anonymous@discussions.microsoft.com.invalid> wrote in message
> news:uZExsqEPEHA.2924@TK2MSFTNGP10.phx.gbl...
> > Hello all:
> >
> >
> >
> > I would like to know how to start a new thread in VB 6.0, to check to
see
> if
> > a key is pressed, and if the ESC is pressed to stop execution. For
> example
> > I have 2 forms. On form 1, I only have a command button that displays
> form2
> > modally. So its code is Form2.show 1. In the load event of form2, I
try
> to
> > fill a MSHFlexGrid control that is very large, and depending on the
data,
> it
> > can take up to 10 minutes. While form2 is loading, I want the user to
be
> > able to stop the process, by hitting the ESC key. Immediately after the
> ESC
> > is hit, the execution of code to pause and a msgbox to come up, and ask
> the
> > user if they want to continue. If they reply yes, then obviously to
> > continue, and if they reply no, to unload form2 all together, and cancel
> the
> > process. I know I can do this with the doevents, and a check variable
in
> my
> > loop, but I rather not do it this way. I want to use the api to do
this.
> > Can someone help me with this and show me the code?
> >
> >
> >
> > I appreciate all your help.
> >
> >
> >
> > Bob
> >
> >
> >
> > PS, I have seen people do this in the C application, but not VB.
> >
> >
>
>
- Next message: alpine: "Re: Copy menu to another form"
- Previous message: Duane Bozarth: "Re: Format of a file"
- In reply to: Dave: "Re: Stopping program execution in another thread"
- Next in thread: Dave: "Re: Stopping program execution in another thread"
- Reply: Dave: "Re: Stopping program execution in another thread"
- Messages sorted by: [ date ] [ thread ]