Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to convert point on screen to various screen resolutions Donna YaWanna Excel Discussion (Misc queries) 5 October 26th 05 10:10 PM
Need to convert point on screen to various screen resolutions Donna YaWanna Excel Programming 5 October 26th 05 10:10 PM
Splash screen and various screen resolutions George J Excel Programming 4 October 3rd 04 10:15 PM
Resizing BackgroundPicture Gifs programmatically for varying screen resolutions Charles Jordan Excel Programming 4 April 13th 04 06:53 PM
different screen resolutions Rob Excel Programming 0 December 10th 03 09:48 PM


All times are GMT +1. The time now is 11:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"