<snip>
>I would appreciate it very much if you can put me on the right track. I'm quite
>new to this kind of programming (matrixes), so maybe you can provide me with a
>working example. That would be one problem less for me. Let me know what I can
>do for you in return then ;). If needed this is my temp email:
>news6544ax@mailsnare.net.
Bookmark (I am inebriated)
- if any of you other guys can see where this leads, jump in
<snip>
>Hi J French,
>
>When I only click on Command2 then I also got an error, but I don't remember
>what it was (I'm not behind my dev pc right now).
I think I know what the problem was, it assumed you had set up the
following menu structure using the Menu Editor
mnuMain
....mnu1
.........mnu2
>I think that your solution is what I need, but to be sure I'll explain a bit
>more what I want:
[quoted text clipped - 16 lines]
>Every directory will contains files which should be presented as menu items. So
>if the user chooses an menu item it should load that file.
I think I follow what you are after, but would you not be better off
using a TreeView ? I don't use them because of the OCX
>I would appreciate it very much if you can put me on the right track. I'm quite
>new to this kind of programming (matrixes), so maybe you can provide me with a
>working example.
The 'matrix' approach is just something I thought would impose a two
dimensional structure on the one dimensional way in which VB menus are
set up
>That would be one problem less for me. Let me know what I can
>do for you in return then ;). If needed this is my temp email:
I'll look into this a bit more, but I have some other problems at
present.
Here is the full form: FORM1.FRM
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 165
ClientTop = 795
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command2
Caption = "Command2"
Height = 435
Left = 1500
TabIndex = 1
Top = 2100
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 375
Left = 1500
TabIndex = 0
Top = 1440
Width = 1095
End
Begin VB.Menu mnuMain
Caption = "Menu"
Begin VB.Menu mnu1
Caption = "M1"
Index = 0
Begin VB.Menu mnu2
Caption = "M2"
Index = 0
End
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Matrix(5, 5) As Object
Private Sub Command1_Click()
Dim L9&
Set Matrix(1, 1) = mnu1 'Control Array
For L9 = 1 To 5
Load Matrix(1, 1)(L9)
Next
End Sub
Private Sub Command2_Click()
Dim L9&, L8&
For L9 = 1 To 2
Set Matrix(1, L9) = Me.Controls("mnu" + CStr(L9))
For L8 = 1 To 5
Load Matrix(1, L9)(L8)
Next
Next
End Sub
dmb - 31 Jul 2004 12:03 GMT
<snip>
>I'll look into this a bit more, but I have some other problems at
>present.
<snip>
Hi J French,
You don't have to think further for me as I found a nice and easy component at
vbAccelerator (IconMenu), which is perfect for what I want.
But still many thanks for your help until now!.