Can any one help me on this please?
I have a popup menu in my application, where I need to load/remove items at runtime.
First I load the menu in form Load() event and later I need to re-create the menu by unloading previous menu items. I'm using following code but there seems a problem with it. Can anyone let me know how to solve this please?
Thanks in advance.
In Form Load()
mnuItem = mnuItem + 1
dim i as integer
for i=1 to 20
Load MyMenu(mnuItem)
MyMenu.Item(mnuItem).Caption = "Item " & i
next
In Command1_Click
Dim i as integer
For i = MyMenu.UBound To 2 Step -1
Unload MyMeny.Item(i)
Next
'now need to load new items
for i=1 to 30
load myMenu(i)
MyMenu.Item(i).Caption = "New Item " & i
next
I have a popup menu in my application, where I need to load/remove items at runtime.
First I load the menu in form Load() event and later I need to re-create the menu by unloading previous menu items. I'm using following code but there seems a problem with it. Can anyone let me know how to solve this please?
Thanks in advance.
In Form Load()
mnuItem = mnuItem + 1
dim i as integer
for i=1 to 20
Load MyMenu(mnuItem)
MyMenu.Item(mnuItem).Caption = "Item " & i
next
In Command1_Click
Dim i as integer
For i = MyMenu.UBound To 2 Step -1
Unload MyMeny.Item(i)
Next
'now need to load new items
for i=1 to 30
load myMenu(i)
MyMenu.Item(i).Caption = "New Item " & i
next