Visual Basic 6.0
Slip19
Q.1) Write a VB program to design progress bar using Timer control. Once process is
completed new form should get open and display message “ Processed Successfully”
[Marks 15]
Solution
Private Sub Timer1_Timer()
ProgressBar1.Value = ProgressBar1.Value + 10
If ProgressBar1.Value = 100 Then
MsgBox "WELCOME"
Timer1.Enabled = False
End If
End Sub
Output
Q.2) Create a Sport database consisting of a single table called booking for storing sports
toolkit information namely name of game, equipment and price.
Write a menu driven program with following options for operations on the database
File Record Modify
Exit Previous Add New
Next Delete Current
First
Last
[Marks 25]
[Marks 25]
Solution
Private Sub ad_Click()
Data1.Recordset.AddNew
MsgBox "record added succesful"
End Sub
Private Sub del_Click()
Data1.Recordset.Delete
MsgBox "record delete successfully"
End Sub
Private Sub exit_Click()
Unload Me
End Sub
Private Sub first_Click()
Data1.Recordset.MoveFirst
MsgBox "no more record"
End Sub
Private Sub last_Click()
Data1.Recordset.MoveLast
MsgBox "no more record"
End Sub
Private Sub next_Click()
Data1.Recordset.MoveNext
End Sub
Private Sub previous_Click()
Data1.Recordset.MovePrevious
End Sub
Output
Tags:
VB 6.0

