By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,815 Members | 1,151 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,815 IT Pros & Developers. It's quick & easy.

Context menu

P: n/a
What is the best way of getting a submenu to regain focus after the click
event or is there a way of handling the click event so that you can run your
code and cancel the event so that the menu maintains it position and focus?
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I once did something similar in VB6. What I had to do was OwnerDraw the
MenuItem, because the MenuItem needs to be disabled. The problem here is
that disabled menuitems do not receive a click event so you need to catch
mouse events via interop.
It may be much simpler to create a user control that looks and acts like a
menu.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"FunIS" <no*****@hotmail.com> wrote in message
news:nTyYc.6206$Rk.5512@trndny03...
What is the best way of getting a submenu to regain focus after the click
event or is there a way of handling the click event so that you can run
your
code and cancel the event so that the menu maintains it position and
focus?

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.742 / Virus Database: 495 - Release Date: 19/08/2004
Nov 21 '05 #2

P: n/a

"FunIS" <no*****@hotmail.com> wrote in message
news:nTyYc.6206$Rk.5512@trndny03...
What is the best way of getting a submenu to regain focus after the click
event or is there a way of handling the click event so that you can run your code and cancel the event so that the menu maintains it position and

focus?

This is not how Windows menus are supposed to work. Why not create your own
control that does what you want but won't confuse your users?
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.