'Aşağıdaki kodlar formlardan bağımsız
'bir BAS modülüne girecek...
Option Explicit
Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Public Const SPI_GETWORKAREA& = 48
Public Declare Function SystemParametersInfo Lib
"user32" Alias "SystemParametersInfoA" (ByVal uAction
As Long, ByVal uParam As Long, lpvParam As Any,
ByVal fuWinIni As Long) As Long
'Form1'e girecek…
Private Sub Command1_Click()
Dim rc As RECT
Dim r As Long
Dim msg As String
r = SystemParametersInfo(SPI_GETWORKAREA, 0&, rc, 0&)
msg = "Ekran Çözünürlüğü" & vbCrLf
msg = msg & "Genişlik - " & rc.Right & vbCrLf
msg = msg & "Yükseklik - " & rc.Bottom & vbCrLf & vbCrLf
Text1 = msg
Me.Move rc.Left * Screen.TwipsPerPixelX, _
rc.Top * Screen.TwipsPerPixelY, _
rc.Right * Screen.TwipsPerPixelX, _
rc.Bottom * Screen.TwipsPerPixelY
End Sub