Advanced MoveSize

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey

Can I use MoveSize to make a form fit into 25% of the screen, whatever the
screen size is??

David
 
Yes you can.

However, changing the size and position of the form DOES NOT change the
size of any of the controls on that form. This can lead to a smaller
form that has scroll bars necessary just to get to information on the
form.

If the data takes up more room that is viewable in the smaller size
then the scroll bars will be needed just to read the data. Also you
definitely HAVE to allow scroll bars just to see the data.

If the data fits in the smallest size then when on a larger screen, it
will look lopsided and look poorly designed.

I am not sure that I would recommend it.

Ron
 
I'm using it in a search area on two different computers.
There is a box that pops up with all the extra information that can't be
seen any way but on one of the computers the bigger screen just gives that
much extra info. It doesn't make it look bad because the information is just
a guide anyway but i would like that one box to fill the whole screen.

So...
How would I do that then?

Thanks David
 
Below I will include how to get the screen resolution. Basically the
answer will be 600x800 or 1072x etc. You could then use a movesize in
a case statement to set the size you want.

How to Get Screen Resolution - Easiest and simplist way

Put the function in a module and then the following code in form onopen
event

==================================================
dim scrWidth as integer
dim scrHeight as integer

scrWidth = apiGetsys(SM_CYSCREEN)
scrHeight = apiGetsys(SM_CXSCREEN)

==================================================

Function and what to request shown below.

Public Declare Function apiGetSys Lib "user32" _
Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long


'*** Define API Constants ***
Public Const SM_CXSCREEN = 0
Public Const SM_CYSCREEN = 1
Public Const SM_CXVSCROLL = 2
Public Const SM_CYHSCROLL = 3
Public Const SM_CYCAPTION = 4
Public Const SM_CXBORDER = 5
Public Const SM_CYBORDER = 6
Public Const SM_CXDLGFRAME = 7
Public Const SM_CYDLGFRAME = 8
Public Const SM_CYVTHUMB = 9
Public Const SM_CXHTHUMB = 10
Public Const SM_CXICON = 11
Public Const SM_CYICON = 12
Public Const SM_CXCURSOR = 13
Public Const SM_CYCURSOR = 14
Public Const SM_CYMENU = 15
Public Const SM_CXFULLSCREEN = 16
Public Const SM_CYFULLSCREEN = 17
Public Const SM_CYKANJIWINDOW = 18
Public Const SM_MOUSEPRESENT = 19
Public Const SM_CYVSCROLL = 20
Public Const SM_CXHSCROLL = 21
Public Const SM_DEBUG = 22
Public Const SM_SWAPBUTTON = 23
Public Const SM_RESERVED1 = 24
Public Const SM_RESERVED2 = 25
Public Const SM_RESERVED3 = 26
Public Const SM_RESERVED4 = 27
Public Const SM_CXMIN = 28
Public Const SM_CYMIN = 29
Public Const SM_CXSIZE = 30
Public Const SM_CYSIZE = 31
Public Const SM_CXFRAME = 32
Public Const SM_CYFRAME = 33
Public Const SM_CXMINTRACK = 34
Public Const SM_CYMINTRACK = 35
Public Const SM_CXDOUBLECLK = 36
Public Const SM_CYDOUBLECLK = 37
Public Const SM_CXICONSPACING = 38
Public Const SM_CYICONSPACING = 39
Public Const SM_MENUDROPALIGNMENT = 40
Public Const SM_PENWINDOWS = 41
Public Const SM_DBCSENABLED = 42
Public Const SM_CMOUSEBUTTONS = 43
Public Const SM_CMETRICS = 44

==========================================

Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Movesize macro action 3
Form size 3
MoveSize for form AND report 4
Sizing Forms 2
1/2" form? 2
API GetWindowRect 1
MoveSize Twips Limit? 10
Restore or maximize after closing a form? 3

Back
Top