Hello,
I create a delayer for something but it dont work right, that i want is
1, Load Form
2, Draw a text in TabPage
3, Show a text in tabpage for 5 seconds
4, when delay end then add WebBrowser Control to TabPage
PS: I forgot notice, when use Thread.Sleep(x) method, it make all programm wait... thats lol;p
Example, if put delay 1 minute you cant do any other action in programm...
i want delay only on TabPage...
any link to see how it work?
This is my code
// Controls we need...
WebBrowser wBrowser = new WebBrowser();
Graphics g;
// Delay Function
private void Delay(int ms)
{
g = TMPage.CreateGraphics();
g.DrawString("Please wait while programm is checking for possible " +
"internet connection...", new Font("Segoe UI", 10), Brushes.Gray, new Point(100, 100));
//WebBrowser Setings
wBrowser.Url = new Uri("http://google.gr");
wBrowser.Dock = DockStyle.Fill;
// Wait a bit...
Thread.Sleep(ms);
TMPage.Controls.Add(wBrowser);
}
private void Form1_Load(object sender, EventArgs e) {
// Delay 3 Seconds before show WebBrowser control...
Delay(3000);