How do I detect left mouse button down and up events on the 'Close' option of the system menu that appears when the mouse is clicked on the top left corner of a form?
priyamtheone
16
Member
Recommended Answers
Jump to PostNot sure if you can actually track that mouse event but you could handle the FormClosing event instead.
Jump to PostAre you trying to detect these events on your form? If so, here's an example:
To use the example:
- Add a MenuStrip named: menuStrip1
- Add a ToolStripMenuItem named: File
Add a ToolStripMenuItem named: Close
Add "MouseDown" and "MouseUp" events
private void closeToolStripMenuItem_MouseDown(object sender, MouseEventArgs e) { …
All 6 Replies
darkagn
315
Veteran Poster
Featured Poster
cgeier
187
Junior Poster
Teme64
215
Veteran Poster
Teme64
215
Veteran Poster
priyamtheone
16
Member
priyamtheone
16
Member
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.