H
HyperX
Hey guys,
Windows FOrms, .NET v1.1.
Lets say there are 2 events in the event queue.
1. Current focus is on a textbox txt1 on inherited form. User presses
F12, calls SaveRecord() Method.
2. SaveRecord() calls txt1_Leave() method.
ParentForm()
{
...
...
SaveRecord();
...
...
public void SaveRecord()
{
this.selectnextcontrol(true,true,blah, blah);
//the above line calls txt1_Leave() method.
...
...
...
}
}
InheritedForm()
{
...
...
public void txt1_Leave()
{
if (aa == bb) //some condition to cancel executing further
SaveRecord()
{
//
//HOW DO I PURGE THE SaveRecord() event HERE??
//cancel executing SaveRecord()
//
}
}
}
I know this could've been written in several ways... we are sooo deep
down in this design that there is no other way that we could fix this
other than cancelling executing SaveRecord() method.
Can anyone please help?
Thanks,
HyperX.
Windows FOrms, .NET v1.1.
Lets say there are 2 events in the event queue.
1. Current focus is on a textbox txt1 on inherited form. User presses
F12, calls SaveRecord() Method.
2. SaveRecord() calls txt1_Leave() method.
ParentForm()
{
...
...
SaveRecord();
...
...
public void SaveRecord()
{
this.selectnextcontrol(true,true,blah, blah);
//the above line calls txt1_Leave() method.
...
...
...
}
}
InheritedForm()
{
...
...
public void txt1_Leave()
{
if (aa == bb) //some condition to cancel executing further
SaveRecord()
{
//
//HOW DO I PURGE THE SaveRecord() event HERE??
//cancel executing SaveRecord()
//
}
}
}
I know this could've been written in several ways... we are sooo deep
down in this design that there is no other way that we could fix this
other than cancelling executing SaveRecord() method.
Can anyone please help?
Thanks,
HyperX.