|
-
Jun 6th, 2005, 09:52 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Enumerate menus
Probably a stupid question, but I can't find it... Can the menu's in a form be enumerated? There doesn't seem to be a Menus collection or something like that.
VB Code:
Dim x as Menu
For Each x In '???
Thanks.
Author for Visual Basic Web Magazine
-
Jun 6th, 2005, 10:03 AM
#2
Re: Enumerate menus
VB Code:
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is Menu Then
' do something
End If
Next ctl
-
Jun 6th, 2005, 10:08 AM
#3
Thread Starter
Fanatic Member
Re: Enumerate menus
Brilliant... why didn't I think of that? 
(And I still can't rate you...)
Author for Visual Basic Web Magazine
-
Jun 6th, 2005, 10:11 AM
#4
Re: Enumerate menus
 Originally Posted by TheVader
Brilliant... why didn't I think of that?
(And I still can't rate you...)

Basically everything is in .Controls, so using Typeof...Is, you can enumerate any type of control you want 
edit: I think it is 10 people you have to rate before you can rate the same person again.
Edit: penagate is correct. Once you have repd someone, you must give reps to at least 10 different members before you are allowed to rep that person again. - Hack
Last edited by Hack; Jun 6th, 2005 at 10:20 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|