Form adaption

jepoysaipan

Registered User.
Local time
Tomorrow, 06:27
Joined
Nov 4, 2007
Messages
133
Hi Guys,

Been searching on the forum and on the web for a week now but seems cannot find the solution on my problem.

Recently deployed an application in our office (Order Tracking) works well then a new guy came and set his screen resolution to 640 x 480 coz he has having problems with high resolution (don't know the term of his sickness sorry), then disaster came since I designed the form on a 1024 x 768 and the border to none he cannot then see the other info on the form.

Question: Is there a way in access to adapt any designed application to the native resolution of every monitor it was installed?

Thanks in advance guys!

Jeff
 
Simple Software Solutions

Cannot take credit for this but I came across this demo a while ago, have not used it in real time but it looks like it will work for you in some respects.

CodeMaster::cool:
 

Attachments

HI DCrake,

Thanks for this zip, tried it looks OK so far, what I am thinking is something that upon loading the form it automatically adjust to its resolution.

Cheers!
 
HI DCrake,

Thanks for this zip, tried it looks OK so far, what I am thinking is something that upon loading the form it automatically adjust to its resolution.

Cheers!

Copy and past the code that is behind the button Resize and put it on the Form Open event. Then it will open to the larger size.
 
Hi Mike,

Tried that route, but it does not work if the the default resolution of the screen is 640 x 480, what I am thinking of is how can I get the native resolution of the screen so that I will just put a condition whereas:

select case resolution
case 640x480
form size is set to 640x480
case 1024x780
form size is set to 1024x780
etc.
etc.

But don't know how to get the native resolution :( Any VB programmers out there?

Thanks.
 
I wonder how the various forums do it.

I searched around on this matter several months ago and I think there were programs you could buy. However, my interest is in permanently changing the forms. All mine were made 800 X 600, are OK at 1024 X768 and would be OK at the next resolution up but then they would be looking too small.
 
its not just the form size - its resizing controls etc to fill the avaialble space

its not easy - i tend to design for a standard screen but 640*480 is just too small to be useful.
 
its not just the form size - its resizing controls etc to fill the avaialble space

its not easy - i tend to design for a standard screen but 640*480 is just too small to be useful.

Yep, the form dimensions are easy to do.

All my forms were done on 800 X 600 and were set so as there was about 1/4" clearance all around. They are OK at 1024 X 768 but for a higher resoltion I would have to change MoveSize so as to centre then otherwise there would be hald an acre of space below them:D

Done any know how forums such as this one automatically adjust.
 
Simple Software Solutions

It's your lucky day.

Here is a module that can get the screen resolution of the pc or laptop

Code:
Declare Function GetDesktopWindow Lib "User32" () As Long
Declare Function GetWindowRect Lib "User32" (ByVal hWnd As Long, rectangle As RECT) As Long
Type RECT
   x1 As Long
   y1 As Long
   x2 As Long
   y2 As Long
End Type

'*****************************************************************
' FUNCTION: GetScreenResolution()
'
' PURPOSE:
'   To determine the current screen size or resolution.
'
' RETURN:
'   The current screen resolution. Typically one of the following:
'      640 x 480
'      800 x 600
'     1024 x 768
'     1280 x 800
'*****************************************************************
Function GetScreenResolution() As String

   Dim R As RECT
   Dim hWnd As Long
   Dim RetVal As Long

   hWnd = GetDesktopWindow()
   RetVal = GetWindowRect(hWnd, R)
   ResWidth = CInt((R.x2 - R.x1))
   ResHeight = CInt((R.y2 - R.y1))
   GetScreenResolution = (R.x2 - R.x1) & "x" & (R.y2 - R.y1)

End Function

Create two global variables named ResWidth and ResHeight

Then on the form Load property employ the following code:

Code:
Call GetScreenResolution
If ShowFrmScreenResolution() = "1" Then
    If ResWidth < 1280 Or ResHeight < 800 Then
       [COLOR="Red"]FrmScreenResolution.Show vbModal[/COLOR]    
    End If
End If

The red line is my own code used in VB. This is where you need to call the resize code.


David
 

Users who are viewing this thread

Back
Top Bottom