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

How to create a menu via a button? and how to see, in a label, a link that the mouse pass over?

P: n/a
Hello,
1- How to see, in a Label, the URL of a link that the mouse pass over?
(in the WebBrower control in a vb projet).
2- How to create a menu and a submenu via a button Command1? and after,
hot to delete these two menus?
Thank in advance.
di*******@hotmail.com
Raymond H.
Bonjour,
Comment voir, dans un label, l'URL du lien qu'on survole avec le curseur
de la
souris dans un WebBrowser1 qui est dans un projet vb?
Raymond H.
di*******@hotmail.com
Jul 17 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
On Sun, 16 Nov 2003 02:53:13 -0500, "Raymond H."
<di*******@hotmail.com> wrote:
Hello,
1- How to see, in a Label, the URL of a link that the mouse pass over?
(in the WebBrower control in a vb projet).
2- How to create a menu and a submenu via a button Command1? and after,
hot to delete these two menus?
Have a look at Form.PopupMenu
- you create the Menu as normal using the Menu Designer
- but set its visible property to False
Thank in advance.
di*******@hotmail.com
Raymond H.
Bonjour,
Comment voir, dans un label, l'URL du lien qu'on survole avec le curseur
de la
souris dans un WebBrowser1 qui est dans un projet vb?
Raymond H.
di*******@hotmail.com


Jul 17 '05 #2

P: n/a
Hello,
Thank you but it's not exactly what I need. I'd like to create a
sub-menu (that already is not exist) via a Command button. I'd like to
create (not to appear one that already exist) and appear after his creation.
I know how to creat menu with 'Load Menu' for exemple, but this need first
at least one menu exist. Me, I'd like to creat one when none menu already
exits. :-)
Raymond H.

"J French" <er*****@nowhere.com> a écrit dans le message de
news:3f**************@news.btclick.com...
On Sun, 16 Nov 2003 02:53:13 -0500, "Raymond H."
<di*******@hotmail.com> wrote:
Hello,
1- How to see, in a Label, the URL of a link that the mouse pass over?
(in the WebBrower control in a vb projet).
2- How to create a menu and a submenu via a button Command1? and after,hot to delete these two menus?


Have a look at Form.PopupMenu
- you create the Menu as normal using the Menu Designer
- but set its visible property to False
Thank in advance.
di*******@hotmail.com
Raymond H.
Bonjour,
Comment voir, dans un label, l'URL du lien qu'on survole avec le curseurde la
souris dans un WebBrowser1 qui est dans un projet vb?
Raymond H.
di*******@hotmail.com

Jul 17 '05 #3

P: n/a
On Sun, 16 Nov 2003 12:14:32 -0500, "Raymond H."
<di*******@hotmail.com> wrote:
Hello,
Thank you but it's not exactly what I need. I'd like to create a
sub-menu (that already is not exist) via a Command button. I'd like to
create (not to appear one that already exist) and appear after his creation.
I know how to creat menu with 'Load Menu' for exemple, but this need first
at least one menu exist. Me, I'd like to creat one when none menu already
exits. :-)


Load Menu
I'm using VB5 - that option does not exist

If I wanted to create Menus on the fly I would use Control Arrays

That way you can do:
Load mnuUtil( 1 )

You can 'design' menus inside UserControls as well as inside Forms
- so it is quite possible to create something that builds menus from
'designed seed Control Arrays' completely on the fly

It is a bit difficult to demonstrate in a NG

However this bit of code is in a UserControl :-

Public Property Get TheMenu() As Menu
Set TheMenu = mnuTop
End Property

And this is in a Form :-

Private Sub Command1_Click()
PopupMenu UserControl11.TheMenu
End Sub

Jul 17 '05 #4

P: n/a
Hello,
I'm not able to create a new sub-menu with your codes. I'd like to
create a sub-menu that already not exist.
a+
Raymond H.

"J French" <er*****@nowhere.com> a écrit dans le message de
news:3f***************@news.btclick.com...
On Sun, 16 Nov 2003 12:14:32 -0500, "Raymond H."
<di*******@hotmail.com> wrote:
Hello,
Thank you but it's not exactly what I need. I'd like to create a
sub-menu (that already is not exist) via a Command button. I'd like to
create (not to appear one that already exist) and appear after his creation.I know how to creat menu with 'Load Menu' for exemple, but this need firstat least one menu exist. Me, I'd like to creat one when none menu alreadyexits. :-)


Load Menu
I'm using VB5 - that option does not exist

If I wanted to create Menus on the fly I would use Control Arrays

That way you can do:
Load mnuUtil( 1 )

You can 'design' menus inside UserControls as well as inside Forms
- so it is quite possible to create something that builds menus from
'designed seed Control Arrays' completely on the fly

It is a bit difficult to demonstrate in a NG

However this bit of code is in a UserControl :-

Public Property Get TheMenu() As Menu
Set TheMenu = mnuTop
End Property

And this is in a Form :-

Private Sub Command1_Click()
PopupMenu UserControl11.TheMenu
End Sub

Jul 17 '05 #5

P: n/a
Unless you're willing to delve into the APIs to totally create and handle
menu messages through subclassing, you'll need at least a single member of
the menu array in order to create submenu's on the fly.

--

Randy Birch
MVP Visual Basic
http://www.mvps.org/vbnet/
Please respond only to the newsgroups so all can benefit.
"Raymond H." <di*******@hotmail.com> wrote in message
news:ae*******************@news20.bellglobal.com.. .
: Hello,
: I'm not able to create a new sub-menu with your codes. I'd like to
: create a sub-menu that already not exist.
: a+
: Raymond H.
:
: "J French" <er*****@nowhere.com> a écrit dans le message de
: news:3f***************@news.btclick.com...
: > On Sun, 16 Nov 2003 12:14:32 -0500, "Raymond H."
: > <di*******@hotmail.com> wrote:
: >
: > >Hello,
: > > Thank you but it's not exactly what I need. I'd like to create a
: > >sub-menu (that already is not exist) via a Command button. I'd like to
: > >create (not to appear one that already exist) and appear after his
: creation.
: > >I know how to creat menu with 'Load Menu' for exemple, but this need
: first
: > >at least one menu exist. Me, I'd like to creat one when none menu
: already
: > >exits. :-)
: >
: > Load Menu
: > I'm using VB5 - that option does not exist
: >
: > If I wanted to create Menus on the fly I would use Control Arrays
: >
: > That way you can do:
: > Load mnuUtil( 1 )
: >
: > You can 'design' menus inside UserControls as well as inside Forms
: > - so it is quite possible to create something that builds menus from
: > 'designed seed Control Arrays' completely on the fly
: >
: > It is a bit difficult to demonstrate in a NG
: >
: > However this bit of code is in a UserControl :-
: >
: > Public Property Get TheMenu() As Menu
: > Set TheMenu = mnuTop
: > End Property
: >
: > And this is in a Form :-
: >
: > Private Sub Command1_Click()
: > PopupMenu UserControl11.TheMenu
: > End Sub
: >
: >
: >
:
:
Jul 17 '05 #6

P: n/a
On Tue, 18 Nov 2003 01:34:39 GMT, "Randy Birch"
<rg************@mvps.org> wrote:
Unless you're willing to delve into the APIs to totally create and handle
menu messages through subclassing, you'll need at least a single member of
the menu array in order to create submenu's on the fly.


Absolutely

I would personally have three 'seeds'

mnuUtil
mnuLevel1(0)
mnuLevel2(0)
mnuLevel3(0)

all are set to Visible = False

Then you Load the items you want

However Raymond, your first priority is getting VB5 or VB6
- VB4 will drive you completely mad
Jul 17 '05 #7

P: n/a
Thank you very much :-)
Raymond H.
"J French" <er*****@nowhere.com> a écrit dans le message de
news:3f****************@news.btclick.com...
On Tue, 18 Nov 2003 01:34:39 GMT, "Randy Birch"
<rg************@mvps.org> wrote:
Unless you're willing to delve into the APIs to totally create and handle
menu messages through subclassing, you'll need at least a single member ofthe menu array in order to create submenu's on the fly.


Absolutely

I would personally have three 'seeds'

mnuUtil
mnuLevel1(0)
mnuLevel2(0)
mnuLevel3(0)

all are set to Visible = False

Then you Load the items you want

However Raymond, your first priority is getting VB5 or VB6
- VB4 will drive you completely mad

Jul 17 '05 #8

P: n/a
On Tue, 18 Nov 2003 14:33:34 -0500, "Raymond H."
<di*******@hotmail.com> wrote:
Thank you very much :-)
Raymond H.


Just get VB5 or VB6

I would not inflict VB4 on my worst enemy

Good Luck

Jul 17 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.