We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Calling one event from another event

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.

2
Contributors
3
Replies
29 Minutes
Discussion Span
5 Months Ago
Last Updated
4
Views
Question
Answered
Rahul47
Junior Poster in Training
84 posts since Jan 2013
Reputation Points: 0
Solved Threads: 1
Skill Endorsements: 0

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

tinstaafl
Nearly a Posting Virtuoso
1,472 posts since Jun 2010
Reputation Points: 429
Solved Threads: 262
Skill Endorsements: 14

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 :)

tinstaafl
Nearly a Posting Virtuoso
1,472 posts since Jun 2010
Reputation Points: 429
Solved Threads: 262
Skill Endorsements: 14

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

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

Rahul47
Junior Poster in Training
84 posts since Jan 2013
Reputation Points: 0
Solved Threads: 1
Skill Endorsements: 0
Question Answered as of 5 Months Ago by tinstaafl

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.0809 seconds using 2.64MB