Rupiah Ekstra Study

Membuat Animasi Jam dan Fungsi Timer

January 28, 2009

Sekarang kita belajar membuat animasi jam dan belajar fungsi Timer

Buat 1 buah label dan timer
dan ketik source code dibawah ini:


Private Sub Form_Load()
Me.Label1.FontBold = True
Me.Label1.FontSize = 24

Me.Timer1.Interval = 1000
End Sub

Private Sub Timer1_Timer()
Me.Label1.Caption = Format(Now, "hh:mm:ss")
End Sub

 

Visual Basic Show Your IP Address

January 28, 2009

Add Microsoft Winsock Control 6.0 component
Insert 1 Textbox
Insert 2 Command Buttons Rename Caption as Display and Clear

Private Sub Command1_Click()
If Text1.Text = "" Then
    Command1.Enabled = False
    Text1.Text = Winsock1.LocalIP
Else
    Command1.Enabled = True
End If
End Sub
Private Sub Command2_Click()
Text1.Text = ""
If Text1.Text = "" Then
    Command1.Enabled = True
Else
    Command1.Enabled = False
End If
End Sub
Private Sub Form_Load()
Text1.Text = ""
If Text1.Text = "" Then
    Command1.Enabled ...


Continue reading...
 

Categories

Blog Archive