View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T[_5_] Peter T[_5_] is offline
external usenet poster
 
Posts: 84
Default Center application window

The screen res' is measured in pixels but the application dimensions are in
points. In most systems to convert it's typically 96 pixels per 72 points.
Simplest way to correct your routine is probably just to do this -

newWidth = 800 * 0.75
newHeight = 600 * 0.75
maxWidth = 1024 * 0.75
maxHeight = 768 * 0.75

If you are distributing to unknown users best to get the screen res and
"points to pixels" using APIs.

Regards,
Peter T