I have 2 buttons on my Form.
My question is if button1 can activate button2 in any way.
Is it possible to write any code inside button1 that will execute/activate the code inside button2 ?
Jennifer84
0
Posting Pro
Recommended Answers
Jump to PostIf the code is run from more than one event, you should refactor it into a method:
…void button1_Click(Object^ sender, EventArgs^ e) { // Stuff for button 1 Button2Stuff(); } void button2_Click(Object^ sender, EventArgs^ e) { Button2Stuff(); } void Button2Stuff() { // Stuff for button 2 }
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.