https://accesstr.net/konu-ekran-cozunurl...crl%c3%bck
konusundaki kodlar işinize yara sanıyorum
Private Sub Form_Open(Cancel As Integer)
Dim oGCC As RECT
Metin1.Value = GetSystemMetrics(0)
Metin3.Value = GetSystemMetrics(1)
Dim pir
GetClipCursor oGCC
With oGCC
pir = .droit & " x " & .bas
If pir <> "1024 x 768" Then
Call ChangeTo1024_768
End If
End With
End Sub
[vb]Option Compare Database
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Declare Function GetClipCursor Lib "user32" (lprc As RECT) As Long
Type RECT
gauche As Long
haut As Long
droit As Long
bas As Long
End Type
Private Declare Function EnumDisplaySettings Lib "user32" Alias "EnumDisplaySettingsA" (ByVal lpszDeviceName As Long, ByVal iModeNum As Long, lpDevMode As Any) As Boolean
Private Declare Function ChangeDisplaySettings Lib "user32" Alias "ChangeDisplaySettingsA" (lpDevMode As Any, ByVal dwflags As Long) As Long
Const CCDEVICENAME = 32
Const CCFORMNAME = 32
Const DM_PELSWIDTH = &H80000
Const DM_PELSHEIGHT = &H100000
Type DEVMODE
dmDeviceName As String * CCDEVICENAME
dmSpecVersion As Integer
dmDriverVersion As Integer
dmSize As Integer
dmDriverExtra As Integer
dmFields As Long
dmOrientation As Integer
dmPaperSize As Integer
dmPaperLength As Integer
dmPaperWidth As Integer
dmScale As Integer
dmCopies As Integer
dmDefaultSource As Integer
dmPrintQuality As Integer
dmColor As Integer
dmDuplex As Integer
dmYResolution As Integer
dmTTOption As Integer
dmCollate As Integer
dmFormName As String * CCFORMNAME
dmUnusedPadding As Integer
dmBitsPerPel As Integer
dmPelsWidth As Long
dmPelsHeight As Long
dmDisplayFlags As Long
dmDisplayFrequency As Long
End Type
Dim DevM As DEVMODE
Private Sub ChangeScreenResolution(iWidth As Single, iHeight As Single)
Dim a As Boolean
Dim i&
Dim b&
i = 0
Do
a = EnumDisplaySettings(0&, i&, DevM)
i = i + 1
Loop Until (a = False)
DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT
DevM.dmPelsWidth = iWidth
DevM.dmPelsHeight = iHeight
b = ChangeDisplaySettings(DevM, 0)
End Sub
Sub ChangeTo1024_768()
Call ChangeScreenResolution(1024, 768)
End Sub
Sub cozunurluk()
Call ChangeScreenResolution(Forms!Form1!Metin1.Value, Forms!Form1!Metin3.Value)
End Sub
Hayat bu
ölsende yaşamaya mecbursun!
UNUTMA!!!
(hafta sonu mesai olmadığından mesajlardaki çözümleri ancak hafta içi uygulayabiliyorum)
Cevapla
Son Düzenleme: 22/04/2011, 17:12, Düzenleyen: kadirdursun.