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 6002709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:01:04+00:00 2026-05-23T01:01:04+00:00

Our environment: Visual Studio 2010, c#, .net 4 client profile. We have a Winforms

  • 0

Our environment: Visual Studio 2010, c#, .net 4 client profile.

We have a Winforms application that contains a menustrip in its main form. The items of the menustrip contain both an image (64×64) and text. The main form also has a TabControl which contains 5 tabs. In the OnLoad() method of the main form, we hide the TabControl headers so that they are not visible and therefore not clickable. Instead, when the user clicks on an item in the menustrip, we switch the active tab.

However, our menus have many sub-menu items, and since we use the main menustrip to select the active tab, we would like the sub-menu items to appear only after the user clicks the menu item for a period of time, not instantaneously. Otherwise, whenever the user changes his/her active view (by selecting a tabPage), the sub-menus appear on the screen since he/she clicked a menustrip item that contains sub menus.

Is this possible?

  • 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-05-23T01:01:05+00:00Added an answer on May 23, 2026 at 1:01 am

    I don’t completely understand the rationale, but you can delay the display of a submenu using the MouseDown handler and sleep function, like this:

    Private Sub FileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FileToolStripMenuItem.MouseDown
    System.Threading.Thread.Sleep(2000) ' wait two seconds
    End Sub
    

    ======================

    (Edit: Added second solution)

    You can do this with a timer control and ShowDropDown/HideDropDown:

    Private Sub FileToolStripMenuItem_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles FileToolStripMenuItem.MouseDown
    ' show tab here'
    FileToolStripMenuItem.HideDropDown()
    Timer1.Interval = 500
    Timer1.Start()
    End Sub
    
    Private Sub FileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FileToolStripMenuItem.Click
    FileToolStripMenuItem.HideDropDown()
    End Sub
    
    Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    Timer1.Stop()
    FileToolStripMenuItem.ShowDropDown()
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an in-house .net 2.0 winforms app currently developed on Visual Studio 2005
In my work environment, Visual Studio currently crashes every time I start our main
In our environment we have a Lib folder which contains various third party assemblies
Visual Studio 2010 has a new feature that is just way cool. You can
We have a DLL, built with MS Visual Studio 2010, in release mode. We
I have a Visual Studio project that gets installed to about half of the
I have created a very simple window service using visual studio 2010 and .NُET
I'm considering running unit tests for my Visual Studio 2010 projects on our build
I have ci , so our staging environment builds itself. Should I have a
Visual Studio is x86 until at least the 2010 release comes around update: this

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.