Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Click event on a Form doesn't work

$
0
0

Hi everyone,

I have an issue and I don't know how to deal with (that's why I'm here).

I have a complete application with different kind of boxes and buttons (I'm not familiar with all this part of programming). One thing I want is catching every click on my HMI. I am able to catch the event ("Click") when the user clicks on a "System.Windows.Forms.Panel" since I configured the properties of this panel to fire an event and do something when "Click" action occurs. I actually did the same with my "System.Windows.Forms.Form", but it doesn't work

Is there something I should know about Properties of this kind of Event or Class ?

I use the Visual Studio 2010 designer editor (the tool which lets you drag and drop buttons and all you need to make your HMI).

Here's the code which is generated by VS and which should enables to fire something once a click occurs:

this->Click += gcnew System::EventHandler(this, &Frm_Main::Frm_Main_MouseClick);

This part of code is also present for the other boxes and buttons of the HMI and it does work for them.

I can also catch Events such as KeyPressed, FormClosing or Loading [...] on that Form... But it doesn't work with "System::Windows::Forms::MouseEventArgs" such as MouseDown, MouseUp...

I hope I'm clear enough.

Thanks

(This post has already been submitted here : http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/1642f13c-118a-4d77-b94e-9afab17a214a)




Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>