Mengubah ukuran tampilan form (Sizable toolwindow) menggunakan SetWindowLong API function


‘Paste kode ini pada Modul

Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd
As Long, ByVal nIndex As Long) As Long

Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd
As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Public Const WS_EX_TOOLWINDOW = &H80&

Public Const GWL_EXSTYLE = (-20)

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

Public Const SWP_FRAMECHANGED = &H20

Public Const SWP_NOMOVE = &H2

Public Const SWP_NOZORDER = &H4

Public Const SWP_NOSIZE = &H1

‘Paste code ini pada form code

Private Sub Form_Load()

Dim xx As Long

xx = GetWindowLong(hwnd, GWL_EXSTYLE)

xx = SetWindowLong(hwnd, GWL_EXSTYLE, _

xx Or WS_EX_TOOLWINDOW)

SetWindowPos hwnd, 0, 0, 0, 0, 0, _

SWP_FRAMECHANGED Or SWP_NOMOVE Or _

SWP_NOZORDER Or SWP_NOSIZE

End Sub

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

Zoemalang's community

ujung malang adalah Sebuah desa yang hilang terganti dengan ujung harapan

YoYo Games Blog Feed

Ujung malang adalah Sebuah desa yang hilang terganti dengan ujung harapan

Dealer Termurah

Menjual Segala Jenis Motor Baru Di Indonesia Cash Maupun Kredit

%d blogger menyukai ini: