Hello:
How do I show a MessageBox with out having the "OK". Reason is I want to display "Connecting To Server, Please Wait...", while the server connection is being attempted, then when its done, have it close.
If I have a good connection its immediate, but if the connection string is bad it waiting like 10-20 seconds. I don't want it sitting there without informing the user.
All i can think of is to display a little form with the message and then close it when the connection attempt is done. Is this the only way?
Loading
theLizardPosted Mar 26, 2010, 1:33 AM
To do whatyou want, create a form without border put your message on a label and show modal in a separate thread at the point where you call the form showing your message have a while loop testing the form is visible or something while it is do not allow any other processing, in your thread, close the form only when you have a connection or it has timed out.
you need to research this.
theLizardPosted Mar 26, 2010, 2:18 AM
GustavoPosted Mar 26, 2010, 1:37 AM
OK, I will play with it. Thanks.
BTW: My login form was 837 lines of code. I cleaned it up and used your routines, now its 240 lines. It can be less but I line to make my DBCommand multiple lines so its easier to read. Thank you so much.
Reason about the bad connection string... I did it on purpose to be sure it would handle it. It does take 5-20 seconds.
GustavoPosted Mar 26, 2010, 1:26 AM
VasanthPosted Mar 26, 2010, 1:20 AM