DoEvent or Loop
Posted on 2011-02-22
First of all, i would like to add this before posting my question...
I remember three years ago here on EE, Visual Basic 6 used to be visible
everytime i used to ask any question about this language, but now all i see
is something pointhing to Visual Basic Classic in which i only see things like
VB Controls, and few more, etc. but nothing mentioning Visual Basic 6...
is this okay? or i am lost? thanks.
Now here is my question,
I would like to add an event to my project instead of delay like i am doing now.
this is what i am working, i have a project that lunch, lets say notepad.exe as an example,
what my project does is rename the caption of that program window.
The only problem i see is this, the program window that my project luch, it takes some
time to luch, some times it takes 3 seconds, some other times it take even 5 seconds...
so what i have in my project is the sleep event, and i would like to change with DoEvent
instead of sleeping, cuz the DoEvent is going to wait for that process to appear and then
rename or do what ever other command i add into my project.
Now am i right about this? if so, how could i acomplish this DoEvent to my project?
the way i am doing it now is on the Load event.
Private Sub Form_Load()
'The rest of my code goes here
Thanks in advance