473,695 Members | 2,540 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

'Modal' ContextMenu?

I'd like to bring up a context menu and block execution until the user either
makes a selection or dismisses the menu. As in the Win32 TrackPopupMenu.

Another post indicated that I might actually be able to call TrackPopupMenu,
but I don't know where the 'handle' argument would come from. Does anyone
know how to do this or to otherwise achieve the same effect?

Feb 3 '06 #1
1 1601
DrBonzo,

You can get the handle of a menu through the Handle property, and then
pass that to TrackPopupMenu.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"DrBonzo" <Dr*****@discus sions.microsoft .com> wrote in message
news:86******** *************** ***********@mic rosoft.com...
I'd like to bring up a context menu and block execution until the user
either
makes a selection or dismisses the menu. As in the Win32 TrackPopupMenu.

Another post indicated that I might actually be able to call
TrackPopupMenu,
but I don't know where the 'handle' argument would come from. Does anyone
know how to do this or to otherwise achieve the same effect?

Feb 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2434
by: Sharon | last post by:
Hi y'all, I'm trying to figure out how to tackle this problem: I have an XML table with a cool grid in which users can select a table row. When they right-click on a cell, they get a modal dialog window with a selection menu. What I want this thing to do is display the different values in the row, so that users can make a selection: eventually I want it to be a filter option > in the selection menu, users can select the value on which...
0
1663
by: MD | last post by:
I have a ContextMenu that is assigned to 3 RichTextBox's (i.e., if you right-click on any of the 3 RichTextBox's, you get the same ContextMenu). My ContextMenu has 2 items, each of which have their own click event handlers. When I click on any of the options in the ContextMenu, I want to know which RichTextBox the ContextMenu is currently opened in, so I thought I could check the SourceControl property. The problem is, the property is...
0
913
by: Oculus | last post by:
Hi, When I Show my context menu I need to do work even if no menu item was selected (unlock distrubuted data that was locked to prevent others users from doing things to it). I'm trying to just set a state varibale for the menuItem_clicks and to the work after the show. There seems to be no way of determining that the ContextMenu was closed -- I'm kind of stuck. The only option I can see at this point is writing my own pseudo-menu...
11
2673
by: Graham Charles | last post by:
I'm writing a control inheriting from ComboBox, and I'd like to add an entry to the ContextMenu for that combo box. I have no problem if I create an entirely new ContextMenu from scratch, but I'd prefer just to tack my MenuItem on to the existing, built-in ContextMenu (Cut, Copy, Paste, etc.): _RemoveMRUItemMenu = New MenuItem _RemoveMRUItemMenu.Text = "&Remove Item" _RemoveMRUItemMenu.Enabled = False
3
2510
by: Libby Sharf | last post by:
Hello, I have several ContextMenus and I want to connect them to the GridControl's ContextMenu property depending on the row that was right clicked. Is there an event that is raised just before the ContextMenu is displayed? (In Delphi we used to have the ContextPopup event and we could change the ContextMenu there.) What is the best way to achieve this? Libby
0
8639
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8999
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8858
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7670
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5841
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4348
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4586
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3016
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 we have to send another system
2
2279
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.