multithreading
-
Hi, I have a piece of code which reads the contents of a cd to and image file using a DOS command line program. While this is running the main window becomes frozen. Does anyone know how I can create a thread that deals with the command line program so that the window does not freeze. Thanks
-
Hi, I have a piece of code which reads the contents of a cd to and image file using a DOS command line program. While this is running the main window becomes frozen. Does anyone know how I can create a thread that deals with the command line program so that the window does not freeze. Thanks
Let's see the code your using to launch this command line process and interact with it. Usually, something like this doesn't block your interface, unless your doing a WaitForExit on the Process object.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
Let's see the code your using to launch this command line process and interact with it. Usually, something like this doesn't block your interface, unless your doing a WaitForExit on the Process object.
Dave Kreskowiak Microsoft MVP - Visual Basic
Hi, This is the code I am using to launch the command Dim command As String command = "C:\readcd dev=1,0,0 f=c:\johntest2.iso" Shell(command, AppWinStyle.Hide) I am also hoping to display a message when the command has finnished. -- modified at 7:23 Wednesday 10th January, 2007
-
Hi, This is the code I am using to launch the command Dim command As String command = "C:\readcd dev=1,0,0 f=c:\johntest2.iso" Shell(command, AppWinStyle.Hide) I am also hoping to display a message when the command has finnished. -- modified at 7:23 Wednesday 10th January, 2007
Are you using VB.NET or VB6??
Dave Kreskowiak Microsoft MVP - Visual Basic
-
Are you using VB.NET or VB6??
Dave Kreskowiak Microsoft MVP - Visual Basic
-
OK. The code you posted is old VB6 stuff. But, in either case, Shell isn't a blocking call, so... There's something else that's hanging up your app. Is it possible that the app you launched is taking up 100% of the CPU??
Dave Kreskowiak Microsoft MVP - Visual Basic
-
OK. The code you posted is old VB6 stuff. But, in either case, Shell isn't a blocking call, so... There's something else that's hanging up your app. Is it possible that the app you launched is taking up 100% of the CPU??
Dave Kreskowiak Microsoft MVP - Visual Basic
-
Hi The app probably would be using most of the cpu time. I came across the process.start which seems to help. Would this be the best thing to use.
Yep. Launching a new process automatically give it it's own thread. It's not dependant on the threads of your app, so launching another thread won't help.
Dave Kreskowiak Microsoft MVP - Visual Basic