Visual Basic 6.0
Slip24
Q.1) Write a VB program to create screen saver on the form. [15 Marks]
Solution
Dim n As Integer
Private Sub Form_Load()
Label1.Top = Me.Height / 2
Label1.Left = Me.Width
Timer1.Interval = 1
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
If n < 200 Then
n = n + 1
Label1.Left = Label1.Left + Val(10)
ElseIf n < 400 Then
n = n + 1
Label1.Left = Label1.Left - Val(10)
Else
n = 0
End If
End Sub
Output
Q.2) Write a VB program to accept the details of book, store those details into the database
and delete the particular record of given book id. (Use InputBox)
[Marks 25]
Solution
Same As Slip11
Tags:
VB 6.0