M
Mihai Tataran
Hello,
I have a strange problem regarding the handling of the Click events in a
Windows CE (with .NET Compact Framework) application.
Here it is:
1. I am in FormA and i press a button which would make the application
navigate to a FormB. But i accidentally press it twice.
2. The unloading of FormA and loading of FormB takes a few seconds because
of many controls which both have.
3. The second click is handled by a button on FormB with the same location
as the initial button on FormA. The most interesting part is that the button
on FormB is disabled.
I don't want the application to react on the second click, since it is made
accidentally - and more sadly it is handled by a button on FormB.
I have also made some tests on a Windows XP with .NET Framework. I have the
same problem here.
Here is some sample code:
//
// button1 on FormB (in InitialiseComponent method)
//
this.button1.Enabled = false;
// ....
private void Form2_Load(object sender, System.EventArgs e)
{
Application.DoEvents();
this.button1.Click +=new EventHandler(button1_Click);
this.button1.Enabled = true;
}
Could you please help?
Thanks,
Mihai
I have a strange problem regarding the handling of the Click events in a
Windows CE (with .NET Compact Framework) application.
Here it is:
1. I am in FormA and i press a button which would make the application
navigate to a FormB. But i accidentally press it twice.
2. The unloading of FormA and loading of FormB takes a few seconds because
of many controls which both have.
3. The second click is handled by a button on FormB with the same location
as the initial button on FormA. The most interesting part is that the button
on FormB is disabled.
I don't want the application to react on the second click, since it is made
accidentally - and more sadly it is handled by a button on FormB.
I have also made some tests on a Windows XP with .NET Framework. I have the
same problem here.
Here is some sample code:
//
// button1 on FormB (in InitialiseComponent method)
//
this.button1.Enabled = false;
// ....
private void Form2_Load(object sender, System.EventArgs e)
{
Application.DoEvents();
this.button1.Click +=new EventHandler(button1_Click);
this.button1.Enabled = true;
}
Could you please help?
Thanks,
Mihai