473,587 Members | 2,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Context Menu Help again...

I wrote about this yesterday...and many people advised the solution. But it
didn't work. Let me put it again:

I have a form with just command button. Then I inserted a context menu
(contextmenu1). Now when I want to run the form I want to display this
context menu when someone LEFT click (not right click) this command button.
Many people told me to use contextmenu1.sh ow method.

In the click event of the button1 I entered the following code:

contextmenu1.sh ow()

But this doesn't work. As soon as I press enter the line becomes blue (that
means some error). Please help .

Thanks.

Nov 20 '05 #1
10 4126
the original advice was pretty close. you need to spec out two arguments
with ContextMenu1.Sh ow, the control (your button by name will work) an the
point at which you want the context menu to appaear. under my click event i
just tried (and it worked) this

Dim asd As New Point
asd.X = 2

asd.Y = 3

ContextMenu1.Sh ow(Button1, asd)

gabe



"Sender" <us**@domain.co m> wrote in message
news:#e******** ******@TK2MSFTN GP12.phx.gbl...
I wrote about this yesterday...and many people advised the solution. But it didn't work. Let me put it again:

I have a form with just command button. Then I inserted a context menu
(contextmenu1). Now when I want to run the form I want to display this
context menu when someone LEFT click (not right click) this command button. Many people told me to use contextmenu1.sh ow method.

In the click event of the button1 I entered the following code:

contextmenu1.sh ow()

But this doesn't work. As soon as I press enter the line becomes blue (that means some error). Please help .

Thanks.

Nov 20 '05 #2
"Sender" <us**@domain.co m> schrieb
I wrote about this yesterday...and many people advised the solution.
But it didn't work. Let me put it again:

I have a form with just command button. Then I inserted a context
menu (contextmenu1). Now when I want to run the form I want to
display this context menu when someone LEFT click (not right click)
this command button. Many people told me to use contextmenu1.sh ow
method.

In the click event of the button1 I entered the following code:

contextmenu1.sh ow()

But this doesn't work. As soon as I press enter the line becomes blue
(that means some error). Please help .


Which error?
--
Armin

Nov 20 '05 #3
Thanks ..
"gabe" <gabe at rebelbase dot com> wrote in message
news:uV******** ******@tk2msftn gp13.phx.gbl...
the original advice was pretty close. you need to spec out two arguments
with ContextMenu1.Sh ow, the control (your button by name will work) an the
point at which you want the context menu to appaear. under my click event i just tried (and it worked) this

Dim asd As New Point
asd.X = 2

asd.Y = 3

ContextMenu1.Sh ow(Button1, asd)

gabe



"Sender" <us**@domain.co m> wrote in message
news:#e******** ******@TK2MSFTN GP12.phx.gbl...
I wrote about this yesterday...and many people advised the solution. But

it
didn't work. Let me put it again:

I have a form with just command button. Then I inserted a context menu
(contextmenu1). Now when I want to run the form I want to display this
context menu when someone LEFT click (not right click) this command

button.
Many people told me to use contextmenu1.sh ow method.

In the click event of the button1 I entered the following code:

contextmenu1.sh ow()

But this doesn't work. As soon as I press enter the line becomes blue

(that
means some error). Please help .

Thanks.


Nov 20 '05 #4
Hello,

"Armin Zingler" <az*******@free net.de> schrieb:
In the click event of the button1 I entered the following code:

contextmenu1.sh ow()

But this doesn't work. As soon as I press enter the line
becomes blue (that means some error).


Which error?


MSDN: 'ContextMenu.Sh ow(ByVal control As Control, ByVal pos As Point)'.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #5
"Herfried K. Wagner [MVP]" <hi*******@m.ac tivevb.de> schrieb
contextmenu1.sh ow()

But this doesn't work. As soon as I press enter the line
becomes blue (that means some error).


Which error?


MSDN: 'ContextMenu.Sh ow(ByVal control As Control, ByVal pos As
Point)'.


*argh* I've never thought that somebody would ask for _this_ reason.
--
Armin

Nov 20 '05 #6
WHAT DO YOU MEAN ??????????????? ??????????????? ??????????????? ?????????

*******
*argh* I've never thought that somebody would ask for _this_ reason.
--
Armin
*******

"Armin Zingler" <az*******@free net.de> wrote in message
news:ub******** ******@TK2MSFTN GP12.phx.gbl... "Herfried K. Wagner [MVP]" <hi*******@m.ac tivevb.de> schrieb
> contextmenu1.sh ow()
>
> But this doesn't work. As soon as I press enter the line
> becomes blue (that means some error).

Which error?


MSDN: 'ContextMenu.Sh ow(ByVal control As Control, ByVal pos As
Point)'.


*argh* I've never thought that somebody would ask for _this_ reason.
--
Armin

Nov 20 '05 #7
Hello,

"Sender" <us**@domain.co m> schrieb:
WHAT DO YOU MEAN ??????????????? ??????????????? ???
??????????????? ??????

*******
*argh* I've never thought that somebody would ask for _this_ reason.


There is no 'Show' method for the 'ContextMenu' class that excepts no
parameters.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #8
"Sender" <us**@domain.co m> schrieb
WHAT DO YOU MEAN
??????????????? ??????????????? ??????????????? ?????????

*******
*argh* I've never thought that somebody would ask for _this_
reason.
--
Armin


Shouldn't be an offending statement to you. Was only an explanation why I
didn't see the fault.
--
Armin

Nov 20 '05 #9
....this is a bit cleaner

Dim MiddleOfSender As New Point(Button1.W idth / 2, Button1.Height / 2)
ContextMenu1.Sh ow(Button1, MiddleOfSender)
"Sender" <us**@domain.co m> wrote in message
news:#Z******** ******@TK2MSFTN GP11.phx.gbl...
Thanks ..
"gabe" <gabe at rebelbase dot com> wrote in message
news:uV******** ******@tk2msftn gp13.phx.gbl...
the original advice was pretty close. you need to spec out two arguments with ContextMenu1.Sh ow, the control (your button by name will work) an the point at which you want the context menu to appaear. under my click event
i
just tried (and it worked) this

Dim asd As New Point
asd.X = 2

asd.Y = 3

ContextMenu1.Sh ow(Button1, asd)

gabe



"Sender" <us**@domain.co m> wrote in message
news:#e******** ******@TK2MSFTN GP12.phx.gbl...
I wrote about this yesterday...and many people advised the solution.

But it
didn't work. Let me put it again:

I have a form with just command button. Then I inserted a context menu
(contextmenu1). Now when I want to run the form I want to display this
context menu when someone LEFT click (not right click) this command

button.
Many people told me to use contextmenu1.sh ow method.

In the click event of the button1 I entered the following code:

contextmenu1.sh ow()

But this doesn't work. As soon as I press enter the line becomes blue

(that
means some error). Please help .

Thanks.



Nov 20 '05 #10

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

Similar topics

1
1277
by: VF | last post by:
I am using several menu items from my main menu in my context menu. For some reason, all the menu items that I use in the context menu no longer show up in my main menu! I thought that maybe the context processing was setting the Visible property to false, but I verified that it is still set to true When I comment out my context code and...
2
1424
by: Paul E Collins | last post by:
A context menu is created in the scope of the RightClick event, but it continues to be displayed after that event handler terminates - i.e. after it has gone out of scope. The code works correctly, but I feel a bit odd about it. Is there anything to watch out for here? By the way, the reason I'm creating the menu dynamically every time is...
0
1556
by: tony.spalding | last post by:
I'm having a problem trying to add a link to my add-in to a context menu. I'm trying to add it to the context menu that you get when you right click on a stored procedure within the Server Explorer and there are a number of problems that I've hit. I'm using VS.NET2005 and am trying to debug the add-in, so when running it it loads up another...
2
2443
by: travelrats | last post by:
Hi Here's my problem - I've been trying to figure this out for a while and ran out of ideas... <div> id1 contains <div> id2 (a geographical map) <div> id2 contains a context menu made out of an <ul> list. the context menu operations work fine, links are hovered, etc When I click one context menu items named "view large", <div> id2 is moved...
2
5898
by: MCM | last post by:
I'm working on a plotting control. The plotting control will have a context menu with basic commands for "scaling", "zooming", etc. Is there a way that, from the parent form, I can add more commands to the control's context menu? I'm envisioning a case where the control has a set of context menu items, and the parent form also has a set...
4
5304
by: ewokspy | last post by:
I have a system tray icon with a context menu set to appear on right-click. On a right click the menu appears fine and I can select an option. The problem is that the event doesn't fire immediately. If I then go to right click again on the icon, the event fires at that time(instead of the context menu apprearing again). Now I have options on my...
4
4204
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 choose, I want to be able to select several files, right click my mouse and launch an application which will act on the selected files. However, I...
19
3259
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 && evt.target) { srcElement = evt.target;
1
1696
by: Phill W. | last post by:
What's the "proper" way of handling this? I have a base Control that offers a small set of options via its ContextMenu. I've now inherited from this and would like to add additional items to this Context Menu structure but how best to do so? Do I override the ContextMenu property in the sub-class, grab the value of MyBase.ContextMenu...
0
7843
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...
0
8206
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, 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. ...
1
7967
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...
0
8220
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5713
isladogs
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...
0
5392
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...
0
3840
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...
1
2353
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
1
1452
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.