I am porting an app from VB6 to VS2005 (VB/Win Forms). It uses a context
sensitive pop up menu. You know, you right click on something and an
appropriately placed menu comes up. I can not find this control.
There a context menu, but I can't get it to come up anywhere but the upper
left.
Any help? 6 1722
In article <95************ *************** *******@microso ft.com>, Ed*@discussions .microsoft.com says...
I am porting an app from VB6 to VS2005 (VB/Win Forms). It uses a context
sensitive pop up menu. You know, you right click on something and an
appropriately placed menu comes up. I can not find this control.
There a context menu, but I can't get it to come up anywhere but the upper
left.
Upper left corner of what -- the screen? The form? The control?
The Show() method should do what you're looking for.
--
Patrick Steele http://weblogs.asp.net/psteele
"Patrick Steele" wrote:
In article <95************ *************** *******@microso ft.com>, Ed*@discussions .microsoft.com says...
I am porting an app from VB6 to VS2005 (VB/Win Forms). It uses a context
sensitive pop up menu. You know, you right click on something and an
appropriately placed menu comes up. I can not find this control.
There a context menu, but I can't get it to come up anywhere but the upper
left.
Upper left corner of what -- the screen? The form? The control?
The Show() method should do what you're looking for.
Thanks for the response Patrick, but no, the show method does nothing more
for me than the visible method. Both display the context menu in the upper
left hand corner of the MDI form that is the parent of the form that contains
the control. There is nothing about the Show method that sets the location
for the menu.
Even here, as I type, I can right click and see a selection of the
following choices:
Undo, Cut, Copy, Paste, Delete and Select All.
And I see this right where the mouse is currently pointing.
This is the behavior I desire.
"EdB" wrote:
>
"Patrick Steele" wrote:
In article <95************ *************** *******@microso ft.com>, Ed*@discussions .microsoft.com says...
I am porting an app from VB6 to VS2005 (VB/Win Forms). It uses a context
sensitive pop up menu. You know, you right click on something and an
appropriately placed menu comes up. I can not find this control.
>
There a context menu, but I can't get it to come up anywhere but the upper
left.
Upper left corner of what -- the screen? The form? The control?
The Show() method should do what you're looking for.
Thanks for the response Patrick, but no, the show method does nothing more
for me than the visible method. Both display the context menu in the upper
left hand corner of the MDI form that is the parent of the form that contains
the control. There is nothing about the Show method that sets the location
for the menu.
Even here, as I type, I can right click and see a selection of the
following choices:
Undo, Cut, Copy, Paste, Delete and Select All.
And I see this right where the mouse is currently pointing.
This is the behavior I desire.
Actually, the context menu appears in the upper left hand corner of the
screen, regardless of the MDI form.
Thanks for the response Patrick, but no, the show method does nothing more
for me than the visible method. Both display the context menu in the upper
left hand corner of the MDI form that is the parent of the form that contains
the control. There is nothing about the Show method that sets the location
for the menu.
Actually, the context menu appears in the upper left hand corner of the
screen, regardless of the MDI form.
Let 'MyControl as Control' be the control (or form) that originates the popup.
Let 'cm as ContextMenu' be the context menu that you want to pop up.
To pop up the menu near the current mouse position, try this:
cm.Show(MyContr ol, MyControl.Point ToClient(MyCont rol.MousePositi on()))
In this usage, I leave MyControl.Conte xtMenu=Nothing. In other words, cm is
built independantly of the originating form/control, and it is tied to the
form/control only when cm.Show is called.
"AMercer" wrote:
Thanks for the response Patrick, but no, the show method does nothing more
for me than the visible method. Both display the context menu in the upper
left hand corner of the MDI form that is the parent of the form that contains
the control. There is nothing about the Show method that sets the location
for the menu.
>
Actually, the context menu appears in the upper left hand corner of the
screen, regardless of the MDI form.
Let 'MyControl as Control' be the control (or form) that originates the popup.
Let 'cm as ContextMenu' be the context menu that you want to pop up.
To pop up the menu near the current mouse position, try this:
cm.Show(MyContr ol, MyControl.Point ToClient(MyCont rol.MousePositi on()))
In this usage, I leave MyControl.Conte xtMenu=Nothing. In other words, cm is
built independantly of the originating form/control, and it is tied to the
form/control only when cm.Show is called.
Shazzam. Thanks.
Is it just me or this process anything but intuitive?
Is it just me or this process anything but intuitive?
Some things are easy, some are really obscure. This one took me a while to
figure out - I guess about 4 hours off and on spread out over a couple of
weeks. I've been using it for a couple of years. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: dfg |
last post by:
Hi...Just a quick question about popup menus. I have a menu popup using
the code below:
Private Sub fraAccBal_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
If Button = 2 Then
PopupMenu mnuHi
End If
End Sub
|
by: Yvan J. Gagnon |
last post by:
I am currenly developing a web site using Macromedia fireworks, and am
trying to figure out a way (through hand-coding) of attaching a
javascript function (onClick="doit=false") to each of the links in my
fireworks-generated dhtml popup menus. Does anyone here know where I
would add this javascript fucntion in the code so that it would be
recognized? And do I do it in the html, or in the JS file?
The javascript function I need to add is...
|
by: Roger Withnell |
last post by:
My simple popup menu code works in IE (Windows and Mac) but not in Safari.
I use a onmouseover ShowMenu function and a onmouseout HideMenu function.
Because Safari, unlike IE, recognises (correctly) text nodes within the
element nodes, the functions run twice as often. If the onmouseover is to or
the onmouseout is to a text node then the functions return false and do
nothing.
But because so many functions are being triggered, if the...
|
by: Sean Mullaly |
last post by:
I have a custom Access menu with sub-menus and sub-sub-menus. (220
items). Right now I have created 220 Functions and attached each
individual Function to the specific OnAction property. The Functions
return Text which is the same as the Caption of the sub-sub-menu items.
I would like to reference the Custom Popup Caption of these
sub-sub-menus and pass it through one Function for input in a form.
*** Sent via Developersdex...
|
by: B Dub |
last post by:
I am merging two menus (a and b) into a third menu (c). Menu A is created by one control, and menu b by another. Each control is responsible for updating their menuitems enabled states and so each has a popup event handler for it's associated menu. After I merge the two menus, I am only receiving the popup event for b (the last menu merged in). I want to receive both, so that I can update the menu item availability for each.
Does anyone...
| |
by: Roger Withnell |
last post by:
My navbar is in a frame down the left hand side of the window.
The frame is 150px wide and the navbar buttons are 100px wide.
Hovering over the buttons displays popup menus to the right of the navbar
and, being 100px wide menus, are cut off by the right hand edge of the
navbar frame.
Is it possible to make the popup menus display on top of the neighbouring
frame? If not, is there another solution?
|
by: diogenes |
last post by:
I have created many shortcut/popup (aka context, or right-click) menus for my
application - instead of toolbars or standard drop-down menus.
Within my custom menu, I am using =ShowMainMenu("item") in the On Action
event where ShowMainMenu is a public function in frmMain, and "item" is a
string mapping to a button click event.
(error trapping omitted)
Public Function ShowMainMenu(strItem As String) As Boolean
|
by: Carl |
last post by:
"Chuckk Hubbard" <badmuthahubbard@gmail.comwrites:
Try creating the "main" popup menu before the sub-menus, and when
instantiating the sub-menus, pass the main menu as the "master"
instead of "self.myparent":
....snip code -----------------------------------------
self.canvas.bind("<Button-3>",self.popup)
|
by: clincoln |
last post by:
I have run into the problem of MS seemingly dropping support for custom popup menus in Access 2007. My app heavily uses popup menus and suddenly I can not even change a typeo in a popup menu or add additional functionality.
Am I seeing this wrong or is there a way to change an existing popup menu in Access 2007?
Sheesh, first Vista, now this....... do I have ANY options here?
|
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...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
|
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,...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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...
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |