View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Screen resolutions and resizing forms

Hi Ken

You can use this in a module

Declare Function GetSystemMetrics32 Lib "user32" Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long

Function DisplayVideoResolution() As String
DisplayVideoResolution = GetSystemMetrics32(0) & " x " & GetSystemMetrics32(1)
End Function

Then in your code you can use this

If DisplayVideoResolution = "1024 x 768" Then ......................


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ken Soenen" wrote in message ...

Is there some software technique that could change the size of your Forms when you run the Forms with different screen
resolutions?
For example: I keep my screen at 1280x1024. When I run the form on say 1024x768, the whole form becomes unnecessarily large and
may not even fit on the screen.
At a minimum, is there some system item that indicates the current screen resolution, that I could query, and then manually(at
Form activation) change the Form and control sizes?

Thanks