Breaking News
Loading...
Kamis, 13 November 2014

Info Post

 Buat Project baru, kemudian Label dan ProgressBar seperti gambar berikut :

 Buat Form baru atau Form2 kemudian Label, TextBox, ComboBox dan CommanButton seperti gambar berikut :




3.      Berikut Script pada form1 ( Loading )
Private Sub Form_KeyPress(KeyAscii As Integer)
Unload Me
End Sub
Private Sub Timer1_Timer()
bar.Value = bar.Value + 2
Screen.MousePointer = vbHourglass
If bar.Value = 10 Then
Label1.Caption = "LOADING . ."
ElseIf bar.Value = 30 Then
Label1.Caption = "LOADING. . ."
ElseIf bar.Value = 50 Then
Label1.Caption = "LOADING."
ElseIf bar.Value = 60 Then
Label1.Caption = "LOADING . ."
ElseIf bar.Value = 100 Then
If bar.Value = 100 Then
If Timer1.Interval >= 1 Then
Unload Me
Form2.Show
Screen.MousePointer = vbDefault
End If
End If
End If
End Sub


4.      Berikut Scirpt pada form2

Private Sub Command1_Click()
If Combo1 = "+" Then
Text3 = Val((Text1) + Val(Text2))
ElseIf Combo1 = "-" Then
Text3 = Val((Text1) - Val(Text2))
ElseIf Combo1 = "/" Then
Text3 = Val((Text1) / Val(Text2))
ElseIf Combo1 = "*" Then
Text3 = Val((Text1) * Val(Text2))
ElseIf Combo1 = "MOD" Then
Text3 = Val((Text1) Mod Val(Text2))
End If
End Sub
Private Sub Command2_Click()
Text1 = ""
Text2 = ""
End Sub
            Private Sub Form_Load()
                Combo1.AddItem "+"
                Combo1.AddItem "-"
                Combo1.AddItem "/"
                Combo1.AddItem "*"
 


 Berikut Saat Program Dijalankan



 Berikut Operasi Kalkulator Dijalankan

0 komentar:

Posting Komentar