Tim, Thanks for the code. It gives me a start. It returns the screen size in pixels. How can I translate into map window X,Y and H,W? Mike n a message dated 9/24/04 10:41:24 AM Pacific Standard Time, [EMAIL PROTECTED] writes:
Mike, Here is a snippet I got somewhere: declare function GetSystemMetrics Lib "user32" alias "GetSystemMetrics" (byval nIndex as integer) as integer declare sub main sub main print "Screen X dimension is " + str$(GetSystemMetrics (0)) print "Screen Y dimension is " + str$(GetSystemMetrics (1)) end sub Tim Nuteson Target -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, September 24, 2004 12:37 PM To: [EMAIL PROTECTED] Subject: MI-L Determine Screen Size for Window Positions Hello all, My MapBasic 7.0 program opens a map, carto legend, and message window in specific spots and sizes on the screen. Works fine until the user goes into Control Panel and changes the display settings, then windows are either too small or too big and off the screen. Is there a way to find the screen display size? With that, I could find the proper window X,Y and Height and Width as a percentage of total screen height and width. Thanks, Mike Kilmore
