Getting the height of a main menu
-
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..
-
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..
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 -
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