skip to main
|
skip to sidebar
home
FORUM
File
Total Kategori
Kategori
*Application By ARBI Blog's
(9)
*Dasar Visual Basic
(2)
CommandButton
(2)
Context Menu
(2)
File
(2)
Folder
(2)
Form
(23)
Keyboard
(2)
Label
(4)
ListBox
(2)
ListView
(3)
Menu
(1)
Mouse
(2)
MS.EXCEL
(3)
Registry
(2)
String
(1)
Textbox
(10)
TreeView
(1)
Windows XP
(5)
Show All Kategory
Archive
►
2012
(1)
►
Januari
(1)
►
2011
(11)
►
November
(2)
►
September
(1)
►
Juni
(1)
►
Maret
(4)
►
Februari
(3)
►
2010
(5)
►
Oktober
(2)
►
September
(2)
►
Februari
(1)
▼
2009
(59)
►
Desember
(1)
▼
November
(33)
Memeriksa Apakah Mouse Terinstall
Memasukkan Gambar Pada ImageList
Cara Mendapatkan Kode ASCII Keyboard
Keyascii Codes
tes
3D Text In Label
Gradient BackColor Label
Animasi Form Load & Unload (Explode \ Implode Effect)
Gradient Forms (Using API)
Gradient Forms
3D Form
Menampilkan Form Dalam Form
Mendeteksi Form Sedang Di Load Atau Tidak
Unload Semua Form
Gradient TitleBar Form
Membuat TitleBar
Menggerakan Form Tanpa TitleBar
Menampilkan Dan Menyembunyikan TitleBar Form
Flash Title Bar
Menambahkan Minimize Button
Menonaktifkan Tombol X pada Form
Form Tidak Dapat Di Close
Lock Move Form
Center Caption Form
Transparent Forms
Merubah Ukuran Form Menjadi Full Screen
Align Right Menu
Menambahkan New Menu Pada System Form
Mendapatkan Drive System
Minimize Semua Jendela Window
Mendapatkan Nama Komputer
Mendapatkan Username Yg Aktif
Membuat Multi Directory
►
Oktober
(14)
►
September
(11)
Recent Comments
Blogroll
Materi Kuliah Api
Contoh Aplikatif : Word and Excell Generator
16 tahun yang lalu
DevPage
VB Helper: Tips, Tricks, & Example Programs for Visual Basic Developers
VBTown - Visual Basic Tutorial
Member
Sabtu, 07 November 2009
Animasi Form Load & Unload (Explode \ Implode Effect)
PERSIAPAN
PROPERTIES
NO
CONTROL
ITEM
NAME
VALUE
KETERANGAN
1.
CommandButton
1
Caption
Exit
Command1
Masukkan souce ini ke dalam Form
Private Sub Command1_Click() 'Replace all the '500' below with the Speed of the Explode\Implode Effect. Call ImplodeForm(Me, 500) End Set Form1 = Nothing End Sub Private Sub Form_Load() Call ExplodeForm(Me, 5000) End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) Call ImplodeForm(Me, 500) End Sub
Masukkan souce ini ke dalam Module
#If Win16 Then Type RECT Left As Integer Top As Integer Right As Integer Bottom As Integer End Type #Else Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type #End If #If Win16 Then Declare Sub GetWindowRect Lib "User" (ByVal hwnd As Integer, lpRect As RECT) Declare Function GetDC Lib "User" (ByVal hwnd As Integer) As Integer Declare Function ReleaseDC Lib "User" (ByVal hwnd As Integer, ByVal hdc As _ Integer) As Integer Declare Sub SetBkColor Lib "GDI" (ByVal hdc As Integer, ByVal crColor As Long) Declare Sub Rectangle Lib "GDI" (ByVal hdc As Integer, ByVal X1 As Integer, _ ByVal Y1 As Integer, ByVal X2 As Integer, ByVal Y2 As Integer) Declare Function CreateSolidBrush Lib "GDI" (ByVal crColor As Long) As Integer Declare Function SelectObject Lib "GDI" (ByVal hdc As Integer, ByVal hObject _ As Integer) As Integer Declare Sub DeleteObject Lib "GDI" (ByVal hObject As Integer) #Else Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, _ lpRect As RECT) As Long Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal _ hdc As Long) As Long Declare Function SetBkColor Lib "gdi32" (ByVal hdc As Long, ByVal _ crColor As Long) As Long Declare Function Rectangle Lib "gdi32" (ByVal hdc As Long, ByVal X1 As Long, _ ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long Declare Function SelectObject Lib "user32" (ByVal hdc As Long, ByVal hObject _ As Long) As Long Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long #End If Sub ExplodeForm(f As Form, Movement As Integer) Dim myRect As RECT Dim formWidth%, formHeight%, i%, X%, Y%, Cx%, Cy% Dim TheScreen As Long Dim Brush As Long GetWindowRect f.hwnd, myRect formWidth = (myRect.Right - myRect.Left) formHeight = myRect.Bottom - myRect.Top TheScreen = GetDC(0) Brush = CreateSolidBrush(f.BackColor) For i = 1 To Movement Cx = formWidth * (i / Movement) Cy = formHeight * (i / Movement) X = myRect.Left + (formWidth - Cx) / 2 Y = myRect.Top + (formHeight - Cy) / 2 Rectangle TheScreen, X, Y, X + Cx, Y + Cy Next i X = ReleaseDC(0, TheScreen) DeleteObject (Brush) End Sub Public Sub ImplodeForm(f As Form, Movement As Integer) Dim myRect As RECT Dim formWidth%, formHeight%, i%, X%, Y%, Cx%, Cy% Dim TheScreen As Long Dim Brush As Long GetWindowRect f.hwnd, myRect formWidth = (myRect.Right - myRect.Left) formHeight = myRect.Bottom - myRect.Top TheScreen = GetDC(0) Brush = CreateSolidBrush(f.BackColor) For i = Movement To 1 Step -1 Cx = formWidth * (i / Movement) Cy = formHeight * (i / Movement) X = myRect.Left + (formWidth - Cx) / 2 Y = myRect.Top + (formHeight - Cy) / 2 Rectangle TheScreen, X, Y, X + Cx, Y + Cy Next i X = ReleaseDC(0, TheScreen) DeleteObject (Brush) End Sub
0 komentar:
Posting Komentar
Posting Lebih Baru
Posting Lama
Beranda
Langganan:
Posting Komentar (Atom)
Logo
Sumbangan
Yahoo! Messager
Jimmy
Facebook
Jimmy
Pasang Link Banner :
Kumpulan Source VB
VISITOR
View shoutbox
About Me
Abe Kaz
rieb
---
| Registry Blog |
| FORUM |
------------------ Jangan lupa kasih Komentar yah ------------------
| Yahoo!Messager |
| Facebook |
---
0 komentar:
Posting Komentar