Hi
I am relitively new to VB and have a quesdtion regarding the MenuStrip. I have a menu strip on which I have created multiple items/menus via the conventional click in the menu and type the items in there. Then I have one menu item "Coms" under which I have "Baud Rate" and "Com Port" the Com Port sub menu gets its items from the following code.
Now I have a question. How do I create click events for those items created. Eg if com port 4 is available and displayed in the list if I click on that menu item "Com Port 4" I would like the program to add the selected com port to a textbox (ComsTextBox). I have found some other forum answers to this question however I find that they are not explained well enough for me to understand.
The available com ports will vary also.
Any help would be appreciated.
I am relitively new to VB and have a quesdtion regarding the MenuStrip. I have a menu strip on which I have created multiple items/menus via the conventional click in the menu and type the items in there. Then I have one menu item "Coms" under which I have "Baud Rate" and "Com Port" the Com Port sub menu gets its items from the following code.
Code:
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
myPorts = IO.Ports.SerialPort.GetPortNames()
End Sub
Private Sub ComPortToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ComPortToolStripMenuItem.Click
ComPortToolStripMenuItem.DropDownItems.AddRange(MyPorts)
End SubThe available com ports will vary also.
Any help would be appreciated.