Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8820819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:42:10+00:00 2026-06-14T05:42:10+00:00

What I am trying to do is make a custom MenuStrip control with several

  • 0

What I am trying to do is make a custom MenuStrip control with several items (Main Menu, Log Out, Exit, etc…) already attached. There would be methods to handle items being clicked. I think this would save me a some redundant code in the long run and I might learn a little something too.

The end product would basically be a custom MenuStrip control that I can throw on my forms and already have the functionality for the items within it.

So my question is, can this be done? I am a novice but if it can be done and is actually a good idea, then I want give it a shot.

Errors abound but this is what I was thinking…

Public Class MenuStripCustom
    Inherits MenuStrip

    Add MenuItem(MainMenuToolStripMenuItem)
    MainMenuToolStripMenuItem.Text = Main Menu

        Protected Sub MainMenuNav(e As System.EventArgs) _
            Handles MyBase.MainMenuToolStripMenuItem.Click
        MainMenu.Visible = True
        Me.Close()
    End Sub

End Class

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:42:11+00:00Added an answer on June 14, 2026 at 5:42 am

    Yes, can be done no problems. Just create a new user control, and make it inherit from MenuStrip. Then put in code similar to the below for a user control called “UserControl1”.

    Public Class UserControl1
        Inherits MenuStrip
    
        Private WithEvents NavToolStrip As New ToolStripMenuItem("Nav")
    
        Sub New()
    
            ' This call is required by the designer.
            InitializeComponent()
    
            ' Add any initialization after the InitializeComponent() call.
            Dim tsi As New ToolStripMenuItem
            Me.Items.Add(NavToolStrip)
        End Sub
    
        Private Sub NavToolStrip_Click(sender As Object, e As EventArgs) Handles NavToolStrip.Click
            MsgBox("Nav clicked")
        End Sub
    End Class
    

    Compile the code then you will be able to drag “UserControl1” from your toolbox onto your form.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a custom context menu. I'll eventually put in all the
I was trying to make a custom application form. I've added some control like
I'm trying to make a custom swing control that is a meter. Swing Meter
I'm trying to make a custom linked list, so far I've figured out how
I am trying to make custom conmtrol in windows phone. My control has dependency
I'm trying to make a custom UITableViewCell as I need to have specific control
I'm trying to make custom control (like UIButton) manually which can recognize user's touch.
I am trying to make a custom control in WPF. I want it to
I'm trying to make a custom control in Silverlight have the same functionality as
I'm trying to make a custom TreeView and make it a user control. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.