Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Screen resolutions and resizing forms
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Screen resolutions and resizing forms
You might consider sizing the form to the screen size...
Here's some code Ron posted a long time ago... 'Fill the Screen Private Sub UserForm_Initialize() With Application Me.Top = .Top Me.Left = .Left Me.Height = .Hight Me.Width = .Width End With End Sub -- steveB Remove "AYN" from email to respond "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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Screen resolutions and resizing forms
That would leave controls along the edges invisible and off the form if he
develops on 1280 by 1040 then displays it on 800 x 600 for example. then if he gathered all the controls in the upper left corner to protect against that, it would just look stupid in 1280 by 1040 <g -- Regards, Tom Ogilvy "STEVE BELL" wrote in message news:Mcknf.9504$Ea6.5376@trnddc08... You might consider sizing the form to the screen size... Here's some code Ron posted a long time ago... 'Fill the Screen Private Sub UserForm_Initialize() With Application Me.Top = .Top Me.Left = .Left Me.Height = .Hight Me.Width = .Width End With End Sub -- steveB Remove "AYN" from email to respond "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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Screen resolutions and resizing forms
Thanks Tom,
Didn't realize this problem... -- steveB Remove "AYN" from email to respond "Tom Ogilvy" wrote in message ... That would leave controls along the edges invisible and off the form if he develops on 1280 by 1040 then displays it on 800 x 600 for example. then if he gathered all the controls in the upper left corner to protect against that, it would just look stupid in 1280 by 1040 <g -- Regards, Tom Ogilvy "STEVE BELL" wrote in message news:Mcknf.9504$Ea6.5376@trnddc08... You might consider sizing the form to the screen size... Here's some code Ron posted a long time ago... 'Fill the Screen Private Sub UserForm_Initialize() With Application Me.Top = .Top Me.Left = .Left Me.Height = .Hight Me.Width = .Width End With End Sub -- steveB Remove "AYN" from email to respond "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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Screen resolutions and resizing forms
It isn't a problem - it is a feature. That is how you would implement a
Show Details button. -- Regards, Tom Ogilvy "STEVE BELL" wrote in message news:gAknf.9714$Ea6.4496@trnddc08... Thanks Tom, Didn't realize this problem... -- steveB Remove "AYN" from email to respond "Tom Ogilvy" wrote in message ... That would leave controls along the edges invisible and off the form if he develops on 1280 by 1040 then displays it on 800 x 600 for example. then if he gathered all the controls in the upper left corner to protect against that, it would just look stupid in 1280 by 1040 <g -- Regards, Tom Ogilvy "STEVE BELL" wrote in message news:Mcknf.9504$Ea6.5376@trnddc08... You might consider sizing the form to the screen size... Here's some code Ron posted a long time ago... 'Fill the Screen Private Sub UserForm_Initialize() With Application Me.Top = .Top Me.Left = .Left Me.Height = .Hight Me.Width = .Width End With End Sub -- steveB Remove "AYN" from email to respond "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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need to convert point on screen to various screen resolutions | Excel Discussion (Misc queries) | |||
Need to convert point on screen to various screen resolutions | Excel Programming | |||
Splash screen and various screen resolutions | Excel Programming | |||
Resizing BackgroundPicture Gifs programmatically for varying screen resolutions | Excel Programming | |||
different screen resolutions | Excel Programming |