Member Avatar for Rahul47

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?


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 for Rahul47

@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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.