I don't have any experience with that :-s, And I looked on google know but the first pages I found all used DoEvents with visual basic.Net. But is it also working in VB 6, because then I will continue my search.
But s small other question, can I vb executable close another running executable, because otherwise a make a small exe with only the keypress and the code for closing the other program. And in the other program, I just start the second program in the begin. Is this possible and how do I do this, because I can start something with shellexecute but i don't know how to close something.
thanks already fr you're fast support.
yes it's possible, but its easier using DoEvents
Lets make a little example.
create a label with caption = 1 and write:
-
private sub Label1_click()
-
do
-
label1.caption = label1.caption +1
-
doEvents
-
loop
-
end sub
that will make the label increase its value as crazy when you click on it but you still can work with the rest of the form. That's what DoEvents is for. To do something else while a process is running.
then just put a command button with something like
- private sub command1_click()
-
end
-
end sub
and you're done
HTH