Kamis, 21 Januari 2010

Splash Screen di VB

Untuk Membuat Splash Screen Di vb Seperti ini:


diperlukan Beberapa control yaitu:
2 buah Timer dengan nama Timer1 dan Timer 2
1 buah picture box
1 buah Command Button dengan nama Command1

codingnya:
     
 Private Sub Timer1_Timer()
'----------------------------------------------------------------------------------'
'Buat bunyi beep pas loading'
'----------------------------------------------------------------------------------'
Dim Cnt As Long
    For Cnt = 0 To 500 Step 10
        Beep Cnt, 50
    Next Cnt
'----------------------------------------------------------------------------------'
'Menampilkan tulisan pas loading'
'----------------------------------------------------------------------------------'
MousePointer = 11
For i = 4 To Screen.FontCount - 1
Command1.Caption = "Loading Programmer........" & " " & Screen.Fonts(i)
Next
Command1.Caption = "Loading Programmer Please Wait....."
Sleep (1500)
Command1.Caption = "Sorting Fonts Completed..."
Sleep (500)
Command1.Caption = "Loading Main Window"
Sleep (500)
Timer2.Enabled = True
Timer1.Enabled = False

MousePointer = 1
'----------------------------------------------------------------------------------'
End Sub

untuk meload ke form lain:
Private Sub Timer2_Timer()
If i >= Screen.FontCount Then
frmSplash.Hide
frmUtama.Show
Unload frmSplash
End If
End Sub

catatan: frmSplash adalah nama form splash
            frmUtama adalah nama form yang ingin di load.

0 comments:

Posting Komentar

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Enter your email address to subscribe:

Delivered by FeedBurner

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | SharePoint Demo