Expand|Select|Wrap|Line Numbers
- namespace WindowsApplication4
- {
- public partial class Form1 : Form
- {
- Thread t1;
- delegate void d1();
- public Form1()
- {
- InitializeComponent();
- t1 = new Thread(new ThreadStart(Sta));
- t1.IsBackground = false;
- t1.start();
- }
- public void Sta()
- {
- button1.Invoke(new d1(DD));
- }
- public void DD()
- {
- webbrowser1 .Navigate("www.google.com");
- }
- }
- }
- }
Expand|Select|Wrap|Line Numbers
- namespace WindowsApplication4
- {
- public partial class Form1 : Form
- {
- Thread t1;
- delegate void d1();
- Thread t2;
- delegate void d2();
- public Form1()
- {
- InitializeComponent();
- t1 = new Thread(new ThreadStart(Sta));
- t1.IsBackground = false;
- t1.Start();
- t2 = new Thread(new ThreadStart(St));
- t2.IsBackground = false;
- t2.Start();
- }
- public void Sta()
- {
- button1.Invoke(new d1(DD));
- // Use any form control for this ....
- }
- public void St()
- {
- button2.Invoke(new d2(DD2));
- // Use any form control for this ....
- }
- public void DD()
- {
- webbrowser1 .Navigate("www.google.com");
- }
- public void DD2()
- {
- webBrowser2.Navigate("www.google.com");
- }
- }
- }