Membuat Form Mover


biasanya kita ingin program kita dibuat dengan gambar, tapi tidak menggunakan fasilitas dari form
atau borderStyle = 0-None

Berikut ini adalah kode untuk memindah form tanpa header

ketik pada modul

‘— begin —
Option Explicit

Public Declare Function SendMessage Lib “user32” Alias “SendMessageA” (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Declare Function ReleaseCapture Lib “user32” () As Long

‘— end of module —

ketik pada form code

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Call ReleaseCapture
Call SendMessage(hwnd, &HA1, 2, 0 & )
end sub

About

Flexter member

Posted in VB 6.0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: