jack-gray
Member
Hi All,
I have a form that has a Main Menu control and I am adding items to the Menu based on user information stored in a text file. I allow the user to select the shortcut key they would like to use from a combobox and then select the application they would like to start from a browse button. The text file stores the string value of the shortcut key (ex. "F3") as well as the .exe file and the path that the file is stored in.
The code for the dynamic menu is...
'add dynamic menus
Dim intcounter As Int32
Call ReadMenuItemsTextFile()
If m_colDynamicApp.Count > 0 Then
'add the Main Menu item below
Me.m_mnuApplications.Visible = True
Me.m_mnuApplications.Index = 2
For intcounter = 1 To m_colDynamicApp.Count
'add the additional items below the Main Menu item
Me.m_mnuApplications.MenuItems.Add _
(m_colDynamicApp.Item(intcounter), _
New EventHandler(AddressOf MenuItem_OpenTool))
'add shortcut information
Next
End If
What I would like to do is use the stored string from the combobox to dynamically add the users choice for the shortcut key. Is there any way to do this in vb.net
Thanks,
I have a form that has a Main Menu control and I am adding items to the Menu based on user information stored in a text file. I allow the user to select the shortcut key they would like to use from a combobox and then select the application they would like to start from a browse button. The text file stores the string value of the shortcut key (ex. "F3") as well as the .exe file and the path that the file is stored in.
The code for the dynamic menu is...
'add dynamic menus
Dim intcounter As Int32
Call ReadMenuItemsTextFile()
If m_colDynamicApp.Count > 0 Then
'add the Main Menu item below
Me.m_mnuApplications.Visible = True
Me.m_mnuApplications.Index = 2
For intcounter = 1 To m_colDynamicApp.Count
'add the additional items below the Main Menu item
Me.m_mnuApplications.MenuItems.Add _
(m_colDynamicApp.Item(intcounter), _
New EventHandler(AddressOf MenuItem_OpenTool))
'add shortcut information
Next
End If
What I would like to do is use the stored string from the combobox to dynamically add the users choice for the shortcut key. Is there any way to do this in vb.net
Thanks,