Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a form ,by invoking mouse_click event,i captured mouse clicked point and stored in 'mpoint' variable.now i have a second form,so my question is how i invoke mouse_click event of first form so that i can use 'mpoint' value in second form
Posted
Comments
BillWoodruff 13-Apr-15 7:27am    
Is the Form where you get the mouse-click the "main form" that creates the other Form where you want to access to mouse-click co-ordinates ?
Anup6 13-Apr-15 23:52pm    
both forms are different.

1 solution

Exactly what you need to do depends on the "relationship" between the two forms. If a form creates an instance of the other, call it the "Parent" and new form it's "Child". Now because the parent knows about the child (it has to in order to create the instance), but the child needn't know about the parent, exactly what you want to do depends on teh relationship between your two forms.

See here:
Transferring information between two forms, Part 1: Parent to Child[^]
Transferring information between two forms, Part 2: Child to Parent[^]
Transferring information between two forms, Part 3: Child to Child[^]
 
Share this answer
 
Comments
Anup6 14-Apr-15 0:43am    
Thanks a lot for replying.But problem is that Your given code snippet is not working on my machine,i am using visual-studio2008.It gives error that"tool version 4.0 is unrecognized"please suggest me solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900