DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Declare Function GetSystemMetrics32 Lib "User32" Alias "GetSystemMetrics" _
(ByVal nIndex As Long) As Long
'
Private Sub UserForm_Initialize()
Dim X1 As Long, Y1 As Long, Y2 As Long, X2 As Long
Dim CX As Double, CY As Double
Dim MyCtrl As Control
X1 = [B][COLOR=red]800[/COLOR][/B]
Y1 = [B][COLOR=red]600[/COLOR][/B]
X2 = GetSystemMetrics32(0)
Y2 = GetSystemMetrics32(1)
CX = X2 / X1
CY = Y2 / Y1
Me.Width = Me.Width * CX
Me.Height = Me.Height * CY
For Each MyCtrl In Me.Controls
MyCtrl.Top = MyCtrl.Top * CY
MyCtrl.Left = MyCtrl.Left * CX
MyCtrl.Width = MyCtrl.Width * CX
MyCtrl.Height = MyCtrl.Height * CY
On Error Resume Next
MyCtrl.Font.Size = MyCtrl.Font.Size * CY
On Error GoTo 0
Next
End Sub
Private Sub UserForm_Initialize()
End Sub
Option Explicit
Type RECT
x1 As Long
y1 As Long
x2 As Long
y2 As Long
End Type
#If VBA7 And Win64 Then
Declare PtrSafe Function GetDesktopWindow Lib "User32" () As Long
Declare PtrSafe Function GetWindowRect Lib "User32" (ByVal hWnd As Long, rectangle As RECT) As Long
#Else
Declare Function GetDesktopWindow Lib "User32" () As Long
Declare Function GetWindowRect Lib "User32" (ByVal hWnd As Long, rectangle As RECT) As Long
#End If
Function ekrancozunurlugu() As String
Dim R As RECT
Dim hWnd As Long
Dim RetVal As Long
hWnd = GetDesktopWindow()
RetVal = GetWindowRect(hWnd, R)
ekrancozunurlugu = (R.x2 - R.x1) & "x" & (R.y2 - R.y1)
If ekrancozunurlugu = "1920x1080" Then ActiveWindow.Zoom = 162
If ekrancozunurlugu = "1680x1050" Then ActiveWindow.Zoom = 141
If ekrancozunurlugu = "1600x1200" Then ActiveWindow.Zoom = 134
If ekrancozunurlugu = "1600x900" Then ActiveWindow.Zoom = 134
If ekrancozunurlugu = "1440x900" Then ActiveWindow.Zoom = 120
If ekrancozunurlugu = "1400x1050" Then ActiveWindow.Zoom = 116
If ekrancozunurlugu = "1366x768" Then ActiveWindow.Zoom = 113
If ekrancozunurlugu = "1360x768" Then ActiveWindow.Zoom = 113
If ekrancozunurlugu = "1280x1024" Then ActiveWindow.Zoom = 106
If ekrancozunurlugu = "1280x960" Then ActiveWindow.Zoom = 106
If ekrancozunurlugu = "1280x800" Then ActiveWindow.Zoom = 106
If ekrancozunurlugu = "1280x768" Then ActiveWindow.Zoom = 106
If ekrancozunurlugu = "1280x720" Then ActiveWindow.Zoom = 106
If ekrancozunurlugu = "1280x600" Then ActiveWindow.Zoom = 106
If ekrancozunurlugu = "1152x864" Then ActiveWindow.Zoom = 95
If ekrancozunurlugu = "1024x768" Then ActiveWindow.Zoom = 84
If ekrancozunurlugu = "800x600" Then ActiveWindow.Zoom = 65
End Function
#If VBA7 And Win64 Then
Declare PtrSafe Function GetDesktopWindow Lib "User32" () As Long
Declare PtrSafe Function GetWindowRect Lib "User32" (ByVal hWnd As Long, rectangle As RECT) As Long
#Else
Declare Function GetDesktopWindow Lib "User32" () As Long
Declare Function GetWindowRect Lib "User32" (ByVal hWnd As Long, rectangle As RECT) As Long
#End If
Private Sub UserForm_Initialize()
listele
Dim X1 As Long, Y1 As Long, Y2 As Long, X2 As Long
Dim CX As Double, CY As Double
Dim MyCtrl As Control
X1 = [B][COLOR=red]800[/COLOR][/B]
Y1 = [B][COLOR=red]600[/COLOR][/B]
X2 = GetSystemMetrics32(0)
Y2 = GetSystemMetrics32(1)
CX = X2 / X1
CY = Y2 / Y1
Me.Width = Me.Width * CX
Me.Height = Me.Height * CY
For Each MyCtrl In Me.Controls
MyCtrl.Top = MyCtrl.Top * CY
MyCtrl.Left = MyCtrl.Left * CX
MyCtrl.Width = MyCtrl.Width * CX
MyCtrl.Height = MyCtrl.Height * CY
On Error Resume Next
MyCtrl.Font.Size = MyCtrl.Font.Size * CY
On Error GoTo 0
Next
End Sub
X1 = [B][COLOR=red]800[/COLOR][/B]
Y1 = [B][COLOR=red]600[/COLOR][/B]