View Single Post
  #1 (permalink)  
Old 02-28-2008, 06:46 PM
willisgt's Avatar
willisgt willisgt is offline
Senior Member
 
Join Date: Aug 2007
Location: Nacogdoches, Texas USA
Posts: 157
Default Problem with VGA form.Height

I'm modifying one of my applications to run on a VGA device. So far, things are going very well (thanks to everyone who suffered through the initial learning phase on VGA screens), but I've run into a problem.

My program places controls based on the height and width of the form, so it can adjust itself to landscape or portrait orientation on a variety of screen sizes.

When I place the controls at the bottom of the screen, I check the form.Height and place the controls accordingly. Problem is, the controls are mostly hidden behind the menu bar at the bottom. The top of a button placed (see below) at the bottom is just peeking out from behind the bar.

I'm doing something similar to:

Code:
   Button1.Top = Form1.Height - Button1.Height - 5
Yes, the SIP is hidden/collapsed.

I imagine I can find some magic number to adjust the 'top' values by, but that defeats the purpose of all the code I've written to make these forms adjust to the various screen resolutions and orientations.

Is there some magic way to get the height of the menu bar?


Gary



---
Note: This problem came up in this thread: Working with VGA screens, but without an answer or resolution.
__________________
PC: Windows XP Pro SP2 / Basic4PPC v6.3
PPC: HTC 8925 (AT&T Tilt) / Windows Mobile 6

Last edited by willisgt : 02-28-2008 at 06:49 PM.
Reply With Quote