20/02/2011, 19:03
Bilgisayar Çözünürlüğünü Düşürdüğümüzde Programın boyutunda Sorunlar Mesdana Geliyo...Kısaca Bilgisayarın Çözünürlüğü İle Programın Boyutunun Eş Zamanlı Gelişmesi İçin Ne Tür Bi Kod Ekleyebilirim...
Dim EkranGenisligi As Long
'Dim EkranYuksekligi As Long
'DoCmd.Maximize
'EkranGenisligi = getScreenSizeX()
'EkranYuksekligi = getScreenSizeY()
'EkranGenisligi = EkranGenisligi * TWIPS_PER_PIXEL
'EkranYuksekligi = EkranYuksekligi * TWIPS_PER_PIXEL
'Me.Section(acDetail).Height = EkranYuksekligi - 1000
'ListeWidth = EkranGenisligi = -2 * (Liste.Left)
'ListeHeight = Me.Section(ac.Detail).Height - Xaxis.Height - (3 * Liste.Top)
Option Compare Database
Option Explicit
Private Declare Function GetSystemMetrics Lib "User32" (ByVal nIndex As Long) As Long
Private Const SM_CXFULLSCREEN = 16
Private Const SM_CYFULLSCREEN = 17
Public Function getScreenSizeX() As Long
getScreenSizeX = GetSystemMetrics(SM_CXFULLSCREEN)
End Function
Public Function getScreenSizeY() As Long
getScreenSizeY = GetSystemMetrics(SM_CYFULLSCREEN)
End Function
Option Explicit
Type Rect
x1 As Long
y1 As Long
x2 As Long
y2 As Long
End Type
' NOTE: The following declare statements are case sensitive.
Declare Function GetDesktopWindow Lib "user32" () As Long
Declare Function GetWindowRect Lib "user32" _
(ByVal hWnd As Long, rectangle As Rect) As Long
'*****************************************************************
' 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
'
'*****************************************************************
Function GetScreenResolution() As String
Dim R As Rect
Dim hWnd As Long
Dim RetVal As Long
hWnd = GetDesktopWindow()
RetVal = GetWindowRect(hWnd, R)
GetScreenResolution = (R.x2 - R.x1) & "x" & (R.y2 - R.y1)
End Function