Jump to content
Xtreme .Net Talk

Recommended Posts

  • *Experts*
Posted

So if I understand you correctly...

 

If I want to show an about screen from the main menu and program a show dialog to display it, then I also have to program the same show dialog from the toolbar menu? The two menu commands cannot be connected so the I only need to program the show dialog once?

Member, in good standing, of the elite fraternity of mentally challenged programmers.

 

Dolphins Software

Posted

Or you can create a sub for the code you want to execute and then in both of the events for the menu and the toolbar, have it call the sub...

 

IE:

 Private Sub RunMyCode()

 End Sub

 Private Sub MenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem4.Click
   RunMyCode()
 End Sub

 Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
   RunMyCode()
 End Sub

UCM

>-)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...