I am using managed VC++ code in a Win Form App. There is a text box -
txtRONumber. I have defined a KeyDown event handler (non-default) for it,
like below. InitializeCompo nent() is being called from Constructor of the
Form Class.
void InitializeCompo nent(void)
{
this->txtRONumber = (gcnew System::Windows ::Forms::TextBo x());
this->txtRONumber->Location = System::Drawing ::Point(151, 35);
this->txtRONumber->Name = L"txtRONumbe r";
this->txtRONumber->Size = System::Drawing ::Size(124, 22);
this->txtRONumber->TabIndex = 0;
this->txtRONumber->KeyDown += gcnew KeyEventHandler (this, &FrmRepairOrder ::
txtRONumber_Key Down);
}
private: System::Void txtRONumber_Key Down(System::Ob ject^ sender,
KeyEventArgs^ e);
Now, I am not sure but either when I add another control to the Form and
rebuild my app or add control, rebuild, close solution, reopen and rebuild,
sometime during any of these the event handler generator gets disappeared
from the InitializeCompo nent() function. I mean this line:
this->txtRONumber->KeyDown += gcnew KeyEventHandler (this, &FrmRepairOrder ::
txtRONumber_Key Down);
Any idea/suggestion?
ThanX.
Sush
--
Message posted via DotNetMonster.c om
http://www.dotnetmonster.com/Uwe/For...et-vc/200808/1