I am using visual studio to design a windows form that has about 50 textboxes in it. I would like to set up the same event for the all textboxs, but I'm not sure how to make the code generic to any textbox versus a specific one. I have it working
the way I want for the first few individual textboxes, but I don't want to have to write the code 50 times to cover them all.
Here is the code I have for an individual textbox:
private: System::Void DkValueTextBox1_TextChanged(System::Object^ sender, System::EventArgs^ e)
if ((Form1::DkValueTextBox1->Text != "") && (Form1::DkValueTextBox1->Text != "."))
DkValue1 = double::Parse(Form1::DkValueTextBox1->Text);
if ((DkValue1 <= 0) || (DkValue17 >= 0))
Thanks for any help!
View Complete Post