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

Context menu's

P: n/a
Just a quick question...

I've built a context menu which I want to pop-up when
right clicking the form, I've set the Form's context menu
property to the name of the menu in question, but it
won't show up at runtime on a right click, what am I
doing wrong ?

Thanks in advance

Regards Steve... ?
Nov 20 '05 #1
Share this Question
Share on Google+
13 Replies


P: n/a
-----Original Message-----
It works fine using this method on all other form
controls but I can't get the menu to pop-up on a blank
section of the form

confused
Regards Steve... ?
.

Nov 20 '05 #2

P: n/a
"Steven Smith" <St**********@emailaccount.com> scripsit:
I've built a context menu which I want to pop-up when
right clicking the form, I've set the Form's context menu
property to the name of the menu in question, but it
won't show up at runtime on a right click, what am I
doing wrong ?


I am not able to reproduce that with VS.NET 2002.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

P: n/a
"Steven Smith" <St**********@emailaccount.com> scripsit:
It works fine using this method on all other form
controls but I can't get the menu to pop-up on a blank
section of the form


Does it work on a _blank_ form if you add a contextmenu and assign it to
the form's 'ContextMenu' property?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

P: n/a
Steven,
I am not able to reproduce this in VB.NET 2003.

I dragged a new ContextMenu item to the form, creating ContextMenu1, I added
some menu items on the new ContextMenu. I set the forms ContextMenu property
to ContextMenu1. I ran the form. Right clicking on the form surface itself I
get the context menu. Actually clicking any place I get my context menu, as
nothing else has a context menu defined for it.

Can you give more details on what you are doing, or post a small sample form
that demonstrates what you did, but does not work?

Hope this helps
Jay
"Steven Smith" <St**********@emailaccount.com> wrote in message
news:0a****************************@phx.gbl...
Just a quick question...

I've built a context menu which I want to pop-up when
right clicking the form, I've set the Form's context menu
property to the name of the menu in question, but it
won't show up at runtime on a right click, what am I
doing wrong ?

Thanks in advance

Regards Steve... ?

Nov 20 '05 #5

P: n/a
-----Original Message----- Does it work on a _blank_ form if you add a contextmenu

and assign it to the form's 'ContextMenu' property?

No, thats the problem herfried, I suppose I could just
throw a big form sized panel or something into the
background and that should provide a way of getting
around this, thanks for looking into it for me anyway

Nov 20 '05 #6

P: n/a
In fact scrap the panel Idea !!! that doesn't work
either, a big form sized picturebox on the other hand
seems to produce the desired illusion nicely... :)
Nov 20 '05 #7

P: n/a
Hmmm I've just tried this on a completely blank form and
it works for me too !

The form that I was working on however was blank except
for containing a main menu, a toolbar & a status bar at
the stage when I tried to drop the context menu on...
Nov 20 '05 #8

P: n/a
-----Original Message-----


ok I just tried this again and it seems to work fine now,
I am relatively new to VS.Net but I know I never done
anything different the first time.

between the failed test and the succesful one all I have
that could make any concievable difference is I closed
Visual Studio & restared it again so I can only put it
down to some kind of minor component failure the first
time it loaded, then again perhaps someone can tell me
different...?
Nov 20 '05 #9

P: n/a
Hi Steven,

We can't say unless there's a failing project to be examined.
By the way, how did you get on with your calculator? The news servers have
been so bad this last week or so that I've no idea whether you got my message
or posted a reply.

Regards,
Fergus
Nov 20 '05 #10

P: n/a
"Steven Smith" <St**********@emailaccount.com> scripsit:
Does it work on a _blank_ form if you add a contextmenu

and assign it to the form's 'ContextMenu' property?

No, thats the problem herfried, I suppose I could just
throw a big form sized panel or something into the
background and that should provide a way of getting
around this, thanks for looking into it for me anyway


Maybe the problem is caused by a problem with your mouse driver. I
would suggest to test the application on an other machine.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #11

P: n/a
"Steven Smith" <St**********@emailaccount.com> scripsit:
ok I just tried this again and it seems to work fine now,
I am relatively new to VS.Net but I know I never done
anything different the first time.

between the failed test and the succesful one all I have
that could make any concievable difference is I closed
Visual Studio & restared it again so I can only put it
down to some kind of minor component failure the first
time it loaded, then again perhaps someone can tell me
different...?


Problem "solved". I think it was a minor failure...

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #12

P: n/a
Here's something to think about.

What's that one thing that still works when your system has crashed... The
mouse.

So why not write the operating system, out of the mouse driver?

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OP**************@TK2MSFTNGP09.phx.gbl...
: "Steven Smith" <St**********@emailaccount.com> scripsit:
: >> Does it work on a _blank_ form if you add a contextmenu
: > and assign it to the form's 'ContextMenu' property?
: >
: > No, thats the problem herfried, I suppose I could just
: > throw a big form sized panel or something into the
: > background and that should provide a way of getting
: > around this, thanks for looking into it for me anyway
:
: Maybe the problem is caused by a problem with your mouse driver. I
: would suggest to test the application on an other machine.
:
: --
: Herfried K. Wagner
: MVP · VB Classic, VB.NET
: <http://www.mvps.org/dotnet>
Nov 20 '05 #13

P: n/a
Here's something to think about.

What's that one thing that still works when your system has crashed...
The mouse.


You know, I've noticed that too. Whoever wrote that mouse code should be
in charge of the whole OS!! :)

Chris
Nov 20 '05 #14

This discussion thread is closed

Replies have been disabled for this discussion.