Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Getting the height of a main menu

Getting the height of a main menu

Scheduled Pinned Locked Moved C#
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CyberKewl
    wrote on last edited by
    #1

    Is there any way of obtaining the height of a main menu (menubar) or is it always the same size regardless of the screen resolution (i think its 20 pixels). The reason why i need to know the height is that i'm trying to make a form with a picturebox inside a panel and resize the form so that it can view the whole image (assuming that my screen res is larger than the image). So i need to do some calculations and stuff..

    J 1 Reply Last reply
    0
    • C CyberKewl

      Is there any way of obtaining the height of a main menu (menubar) or is it always the same size regardless of the screen resolution (i think its 20 pixels). The reason why i need to know the height is that i'm trying to make a form with a picturebox inside a panel and resize the form so that it can view the whole image (assuming that my screen res is larger than the image). So i need to do some calculations and stuff..

      J Offline
      J Offline
      James T Johnson
      wrote on last edited by
      #2

      Assuming you aren't using owner drawn menus the menu height is given by System.Windows.Forms.SystemInformation.MenuHeight. James "then when you go to bed...wait, you dont do that do you....ok....when you plug into the 'hive mind' to charge yourself, ill hack into your head" Nnamdi Onyeyiri over MSN

      C 1 Reply Last reply
      0
      • J James T Johnson

        Assuming you aren't using owner drawn menus the menu height is given by System.Windows.Forms.SystemInformation.MenuHeight. James "then when you go to bed...wait, you dont do that do you....ok....when you plug into the 'hive mind' to charge yourself, ill hack into your head" Nnamdi Onyeyiri over MSN

        C Offline
        C Offline
        CyberKewl
        wrote on last edited by
        #3

        Thanks. That did the trick.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups