is threre a message box which does not block the execution of the program

kanak

Newcomer
Joined
Jan 9, 2005
Messages
16
hi all

i want to know is there a information message box ... which does not block the execution of the program..... i want a message box which does not reqires a user input but just to gives a alert of the information... and destroys itself... i tried creating a window form like message box ... and used a thread to display to form for 5 seconds .. i used to following coding in the button click event


dim f2 as new form2
f2.show()
f2.textbox1.text="Please wait for 5 seconds"
thread.currentthread.sleep(5000)
f2.close()

but the problem is the form2 is getting hanged .. and is not displayin the information in the text box.. so anyone can help me with a message box which does not have this problem. .... as if i use a messagebox is that till i click the "ok" button in the message box it wont execute the nex step ....
so anyone please help
 
I got your code working by adding a simple application.doevents

Visual Basic:
dim f2 as new form2
f2.Show()
f2.TextBox1.Text = "Please wait for 5 seconds"
Application.DoEvents()
thread.currentthread.sleep(5000)
f2.close()
 
Back
Top