Member Avatar

Hello all,

I Wish to call Button1_click event of Form1 in Button2_Click event of Form2.

i.e Calling event of one form into evnet of other form.

How can I achieve this?

Thanks.

Recommended Answers

try this Form1.Button1.PerformClick(). Put this in the click event of the button on form 2.

Jump to Post

All 3 Replies

try this Form1.Button1.PerformClick(). Put this in the click event of the button on form 2.

oops almost forgot. the form might have to be showing first. A better solution might be to put the code in a public sub and let each button call it.

As usual don't forget to mark solved problems solved :)

Member Avatar

@tnstaafl: hey, thanks that really works.....

so how do i mark your answer as solved ???
Am kinda new in here !!
:P :P

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.