Solve one problem and along comes another 
Fixed my problem with my app always running at 100% cpu usage by using the following...
<SNIP CODE>
'Declarations
Private Declare Sub Sleep Lib "kernel32" _
(ByVal dwMilliseconds As Long)
' Main Sub
Sub Main()
Dim foobar
While foobar <> "OK"
Call myStart
Wend
End Sub
<SNIP CODE>
The myStart sub as a routine to continously scan a directory for a file, which was orignally causing teh CPU max out, so if the directory is empty, instead of looking again, it waits 6000 ms by calling the declration Sleep above.
This works great! No CPU max out, however, after, I think 30 or so seconds of inactivity, task manager reports that the app is not responding, but if I dump a file to be converted into the folder, it pops back to life, then immediate goes back into "not responding" phase until more files are added to the folder and so on.
How do I keep alive my VB app to stop it from not responding??? Jace Hayman
jason.hayman@virgin.net
Fixed my problem with my app always running at 100% cpu usage by using the following...
<SNIP CODE>
'Declarations
Private Declare Sub Sleep Lib "kernel32" _
(ByVal dwMilliseconds As Long)
' Main Sub
Sub Main()
Dim foobar
While foobar <> "OK"
Call myStart
Wend
End Sub
<SNIP CODE>
The myStart sub as a routine to continously scan a directory for a file, which was orignally causing teh CPU max out, so if the directory is empty, instead of looking again, it waits 6000 ms by calling the declration Sleep above.
This works great! No CPU max out, however, after, I think 30 or so seconds of inactivity, task manager reports that the app is not responding, but if I dump a file to be converted into the folder, it pops back to life, then immediate goes back into "not responding" phase until more files are added to the folder and so on.
How do I keep alive my VB app to stop it from not responding??? Jace Hayman
jason.hayman@virgin.net