Lunes, Pebrero 4, 2013

Tabulation



Tabulator

Private Sub Clear_Click()
Combo1.Text = ""
Combo2.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End Sub

Private Sub Command1_Click()
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Combo1.Enabled = True
Combo2.Enabled = True
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
End Sub

Private Sub Command2_Click()
If Combo1.Text = "" Then
MsgBox "Judge no. is missing", vbCritical, "Unable to add"
Combo1.SetFocus
ElseIf Combo2.Text = "" Then
MsgBox "Contestant no.", vbCritical, "Unable to add"
Combo2.SetFocus
ElseIf Text1.Text = "" Then

Text1.Text = InputBox("Production no.", "Production no. is missing")
ElseIf Text2.Text = "" Then
Text2.Text = InputBox("Talent", "Talent is missing")
ElseIf Text3.Text = "" Then
Text3.Text = InputBox("playsuit attire", "playsuit attire is missing")
ElseIf Text4.Text = "" Then
Text4.Text = InputBox("evening gown", "evening gown is missing")
ElseIf Text5.Text = "" Then
Text5.Text = InputBox("interview", "interview is missing")

Else
Dim item As ListItem
Set item = ListView1.ListItems.Add(, , Combo1.Text)
item.SubItems(1) = Combo2.Text
item.SubItems(2) = Text1.Text
item.SubItems(3) = Text2.Text
item.SubItems(4) = Text3.Text
item.SubItems(5) = Text4.Text
item.SubItems(6) = Text5.Text
item.SubItems(7) = Label12.Caption

MsgBox "Successfully added", vbInformation, "Adding"
End If

End Sub

Private Sub Command3_Click()
Dim rems As Integer
rems = ListView1.SelectedItem.Index
ListView1.ListItems.Remove (rems)
End Sub

Private Sub Command4_Click()
Combo1.Text = ""
Combo2.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""

End Sub

Private Sub Command5_Click()
MsgBox "Exiting program", vbInformation, "log-out"
Unload Me
Form1.Show

End Sub

Private Sub Exit_Click()
MsgBox "Exiting program", vbInformation, "log-out"
Unload Me
Form1.Show


End Sub

Private Sub Form_Load()
VScroll1.Max = Picture1.Height - Me.ScaleHeight
VScroll1.LargeChange = 1000
VScroll1.SmallChange = 200
Picture1.Top = 0
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Combo1.Enabled = False
Combo2.Enabled = False
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False






End Sub




Private Sub Label12_Change()
Label12.Caption = Val(Text1.Text) * Val(0.1) + Val(Text2.Text) * Val(0.25) + Val(Text3.Text) * Val(0.15) + Val(Text4.Text) * Val(0.2) + Val(Text5.Text) * Val(0.3)
End Sub

Private Sub New_Click()
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Combo1.Enabled = True
Combo2.Enabled = True
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
End Sub

Private Sub Remove_Click()
Dim rems As Integer
rems = ListView1.SelectedItem.Index
ListView1.ListItems.Remove (rems)
End Sub

Private Sub Save_Click()
If Combo1.Text = "" Then
MsgBox "Judge no. is missing", vbCritical, "Unable to add"
Combo1.SetFocus
ElseIf Combo2.Text = "" Then
MsgBox "Contestant no.", vbCritical, "Unable to add"
Combo2.SetFocus
ElseIf Text1.Text = "" Then

Text1.Text = InputBox("Production no.", "Production no. is missing")
ElseIf Text2.Text = "" Then
Text2.Text = InputBox("Talent", "Talent is missing")
ElseIf Text3.Text = "" Then
Text3.Text = InputBox("playsuit attire", "playsuit attire is missing")
ElseIf Text4.Text = "" Then
Text4.Text = InputBox("evening gown", "evening gown is missing")
ElseIf Text5.Text = "" Then
Text5.Text = InputBox("interview", "interview is missing")

Else
Dim item As ListItem
Set item = ListView1.ListItems.Add(, , Combo1.Text)
item.SubItems(1) = Combo2.Text
item.SubItems(2) = Text1.Text
item.SubItems(3) = Text2.Text
item.SubItems(4) = Text3.Text
item.SubItems(5) = Text4.Text
item.SubItems(6) = Text5.Text
item.SubItems(7) = Label12.Caption

MsgBox "Successfully added", vbInformation, "Adding"
End If
End Sub

Private Sub Text1_Change()
Label12.Caption = Val(Text1.Text) * Val(0.1)


End Sub

Private Sub Text2_Change()
Label12.Caption = Val(Text2.Text) * Val(0.25)

End Sub

Private Sub Text3_Change()
Label12.Caption = Val(Text3.Text) * Val(0.15)

End Sub

Private Sub Text4_Change()
Label12.Caption = Val(Text4.Text) * Val(0.2)


End Sub

Private Sub Text5_Change()
Label12.Caption = Val(Text5.Text) * Val(0.3)


End Sub

Private Sub Timer1_Timer()
Label8.Caption = Date
Label9.Caption = Time
If Label10.Visible = True Then
Label10.Visible = False
Label10.Caption = "Welcome"
ElseIf Label10.Visible = False Then
Label10.Visible = True
End If
End Sub

Private Sub VScroll1_Change()
Picture1.Top = -VScroll1.Value

End Sub

0 (mga) komento:

Mag-post ng isang Komento

OWN BY HERBERT CARINOTE. Pinapagana ng Blogger.