klw masih pusing dengan judulnya Silahkan Dicoba.. dan dapat dilihat hasilnya.
‘Masukan coding dibawah ke dalam modul
Declare Function SetWindowPos Lib "user32" (ByVal hwnd
As Long, _
ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, _
ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Public Const SM_CXSCREEN = 0
Public Const SM_CYSCREEN = 1
Public Const HWND_TOP = 0
Public Const SWP_SHOWWINDOW = &H40
ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, _
ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Public Const SM_CXSCREEN = 0
Public Const SM_CYSCREEN = 1
Public Const HWND_TOP = 0
Public Const SWP_SHOWWINDOW = &H40
‘masukan coding dibawah ke dalam form
Private Sub Command1_Click()
Dim ll_Width As Long
Dim ll_Height As Long
If Me.WindowState = vbMaximized Then
WindowState = vbNormal
End If
‘bekerja di luar dimensi layar penuh
ll_Width = GetSystemMetrics(SM_CXSCREEN)
ll_Height = GetSystemMetrics(SM_CYSCREEN)
Dim ll_Width As Long
Dim ll_Height As Long
If Me.WindowState = vbMaximized Then
WindowState = vbNormal
End If
‘bekerja di luar dimensi layar penuh
ll_Width = GetSystemMetrics(SM_CXSCREEN)
ll_Height = GetSystemMetrics(SM_CYSCREEN)
'gunakan SetWindowPos untuk mengubah ukuran jendela
Call SetWindowPos(Me.hwnd, HWND_TOP, 0, 0,
ll_Width, _
ll_Height, SWP_SHOWWINDOW)
End Sub
Private Sub Command2_Click()
WindowState = vbMaximized
End Sub
ll_Height, SWP_SHOWWINDOW)
End Sub
Private Sub Command2_Click()
WindowState = vbMaximized
End Sub
0 komentar:
Posting Komentar