473,386 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Dim XX as menu

Hello. I'm looking for an example of using Dim as Menu in VB6.
Any help would be appreciated.

Thanks !
Jul 17 '05 #1
2 4599
On Sat, 28 Aug 2004 10:27:55 +0200, Bezeqint wrote:
Hello. I'm looking for an example of using Dim as Menu in VB6.
Any help would be appreciated.

Thanks !


What exactly are you trying to do? Dynamic menus? Or just setting
references to existing menus?

Reference:
Dim x As Menu
Set x = mnuFoo

Dynamic:
c = c + 1
Load mnuFooBar(c)
mnuFooBar(c).Caption = "blah"
[Dynamic menus must be created as an array in the menu editor.]

Does that help? Or do you need more info?
--
auric underscore underscore at hotmail dot com
*****
A good mentor should point the way with advice and a heavy piece of wood.
Jul 17 '05 #2
> On Sat, 28 Aug 2004 10:27:55 +0200, Bezeqint wrote:
Hello. I'm looking for an example of using Dim as Menu in VB6.
Any help would be appreciated.

Thanks !


What exactly are you trying to do? Dynamic menus? Or just setting
references to existing menus?

Reference:
Dim x As Menu
Set x = mnuFoo

Dynamic:
c = c + 1
Load mnuFooBar(c)
mnuFooBar(c).Caption = "blah"
[Dynamic menus must be created as an array in the menu editor.]


To add to your dynamic case, you could Dim As Menu in order to iterate
the control array of menus (named mnuFooBar for your example) to get at
particular properties of each menu item in the control array...

Dim mnu As Menu
For Each mnu In mnuFooBar
Debug.Print mnu.Index & " - " & mnu.Caption
Next

or, depending on how dynamic everything is, using it to filter down to a
particular menu item. For example, if the Caption for one of the items
is "Can you see me?", the following could be used to test it's Visible
property...

Dim mnu As Menu
For Each mnu In mnuTop
If mnu.Caption = "Can you see me?" Then
If mnu.Visible Then
Debug.Print "I can see it!"
Else
Debug.Print "It is invisible!"
End If
End If
Next

Rick - MVP

Jul 17 '05 #3

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

Similar topics

1
by: Macamba | last post by:
Hi all, I am currently developing a website for a voluntary organisation. It is my first step in website development. The dynamic menu I developed has some bugs, which I addressed in another...
1
by: ajay | last post by:
I have following code for a slide menu but i twiked it to work for a single level menu. Open it in a Browser to get a clear picture. I have 2 Qs 1) How to make first entry as non-link. i.e i...
2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
8
by: Dennis C. Drumm | last post by:
Is there a way to modify the standard context menu shown when someone right clicks in a windows text box and that would work for all open windows applications? The standard context menu for...
1
by: Anthony | last post by:
Below is a script I found at http://javascript.internet.com/ for a cascading menu. The script works great but there is one thing that I would like modified. BecauseI am just learning javascript,...
4
by: TycoonUK | last post by:
Hi, As I do not have IE7 on my computer, I was wondering if there is a fault in my CSS Menu when using IE7. Please can someone look at my site - http://www.worldofmonopoly.co.uk and tell me...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...

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.