473,507 Members | 2,416 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# Context Menu not getting destroyed

1 New Member
I have a right click menu on my page and when I right click but click away instead of choosing an option, I get very weird behavior on the rest of the page. The text input controls are unable to receive focus. It appears that the right click menu is retaining focus even though it has disappeared. Even though I can't see the right click menu, navigating up/down with the keyboard arrows and pressing enter executes options on the now-invisible right click menu.

I've tried explicitly calling .Focus(), .Select(), .BringToFront(), etc. on the text controls to bring them back into focus after I've clicked away from the right click menu, but nothing seems to work.

Calling .Dispose() on the right click menu's _Closed event throws a fatal exception. The only solution I can find is to SendKey an ESC key to mimic the user destroying the right click menu that way but that seems risky.

Any ideas?
Feb 1 '08 #1
1 1525
Plater
7,872 Recognized Expert Expert
Is this a web application by any chance? Since they don't normally support custom right-click context menus, it's all funny javascript.

If this is a windows application, are you doing anything funky with the context menu, like calling it manually (instead of just assigning it to a control) or anything?
Feb 4 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2580
by: Yuri O. | last post by:
Hi I'm wondering whether is existing any working way of getting real metrics about the active ContextMenu. For example ContextMenu(.net) expose window handler which I tried to use in...
5
5468
by: Dean L. Howen | last post by:
Dear friends, Could we determine when context menu should appear?
2
1621
by: Dino M. Buljubasic | last post by:
I have several context menus added to my form. The form is displaying items in listviews connected to the context menus. When I click on an item in a list view, a popup context menu shows allowing...
2
2741
by: gilad | last post by:
Hi, I seem to be having a problem getting a context menu to work in Explorer. The menu item installs fine, but when I click it a message box should pop up indicating the command was received and...
5
3820
by: james | last post by:
Hello, I am having a little trouble creating an event handler for a context menu toolstripmenuitem. I've seen various tutorials and so on, but I keep getting a bit stuck! So far I have a second...
0
1527
by: Patel | last post by:
Hi All, I am doing one INTERESTING work with Context Menu Strip. I am trying to insert a custom control / .Net control in Context menu as a context menu strip. I tried inserting MonthCalender in...
4
4191
by: Karl | last post by:
Hi all, I want to write an application that is launched from the context menu in Windows Explorer/Computer. That is to say, when I am browsing around my hard drive and get to any location I...
3
5017
by: Poggs | last post by:
Hi everyone, I used the pattern for Shell Extensions for Context menu from Dino Esposito's article. However I implemented it in more than one application and it seems that those two right click...
19
3243
by: BibhuAshish | last post by:
Hello, I have created a context menu in mozilla by using following code: function nrc(e) { var contextMenu; document.oncontextmenu = function (evt) { var srcElement; if (evt &&...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7111
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7319
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7031
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7485
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1542
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.