J
JoeB
Hi,
This is 100% reproducable. .NetCF / WinCE5.0 / VS.Net 2003
1. Create a new 'smart device application' project.
2. Add a progress bar to the form 'progressBar1'
3..Add: using System.Threading; to the top of the code.
4. Add this in Form1() after the call to InitializeComponent()
System.Threading.ThreadStart ts = null;
ts = new System.Threading.ThreadStart( CycleProgressBar );
System.Threading.Thread t = new System.Threading.Thread( ts );
t.Start();
5. Add this to the class:
private void CycleProgressBar()
{
Thread.Sleep(2000);
int x = 0;
while( true )
{
progressBar1.Value = x;
x+= 10;
if( ++x > 100 )
{
x = 0;
}
Thread.Sleep(200);
}
}
Now deploy.-- When the app starts the porgress bar wil start to cycle.
wiggle the mouse over the progress bar, and the application locks dead!
How can i stop this bug?!
Joe
This is 100% reproducable. .NetCF / WinCE5.0 / VS.Net 2003
1. Create a new 'smart device application' project.
2. Add a progress bar to the form 'progressBar1'
3..Add: using System.Threading; to the top of the code.
4. Add this in Form1() after the call to InitializeComponent()
System.Threading.ThreadStart ts = null;
ts = new System.Threading.ThreadStart( CycleProgressBar );
System.Threading.Thread t = new System.Threading.Thread( ts );
t.Start();
5. Add this to the class:
private void CycleProgressBar()
{
Thread.Sleep(2000);
int x = 0;
while( true )
{
progressBar1.Value = x;
x+= 10;
if( ++x > 100 )
{
x = 0;
}
Thread.Sleep(200);
}
}
Now deploy.-- When the app starts the porgress bar wil start to cycle.
wiggle the mouse over the progress bar, and the application locks dead!
How can i stop this bug?!
Joe