How vb.Net process a form

jvcoach23

Well-known member
Joined
May 22, 2003
Messages
192
Location
Saybrook, IL
New to vb and vb.net. I little util that Im writing that is using one form. It processes through, Im changing the color of a couple of buttons to indicate success or failure of a coupld of stored procedures. Im call calling the private subs kind of like this.

ValidiateLogin1()
ValidateAccessToDb()


If the ValidateLogin1 and ValidateAccessToDb are successful, it comes back real quick, if the ValidateAccessToDb is not successful, the status for ValidateLogin1 doesnt change until the ValidiateAccessToDb come back as a failure. How do you make the button that represents ValidateLogin1 change before it starts on ValidateAccessToDb

Thanks
 
I dont fully understand what youre trying to do, but if Im right you want that each process execute without waiting for the other process to finish.
What I suggest to you is to use multithreading for your app. you can start two independent threads with their respectives handlers one for each process, if process 1 finishes, the status of the button will change without waiting for the second process to finish.
You can find something about this in MSDN Library at the following link
http://msdn.microsoft.com/library/d...s/cpguide/html/cpconusingthreadsthreading.asp

Besides, if this si too much for the app youre developing you can try using a refresh for your control before starting the second process, remember that VB process the code in a linear way, line by line, if one line has a call to another sub or function first executes the sub and the continues with the next line.

Regards
 
The refresh worked great.. I wanted it to do it linearly (if thats a word).. the refresh between my two calls to the sub worked great. Thanks for the link to the other mulitthread though.. Id like to play with that.

Many thanks
 
Back
Top