Sunday 26 June 2011

Airlines information system





Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim l As Integer
Dim m As Integer
Dim n As Integer
Dim Raees(1 To 2) As Picture
Private Sub Command1_Click()
Form1.Show
WELCOME.Hide
End Sub
Private Sub Command2_Click()
Dim Raees As Integer
On Error GoTo cancle
CommonDialog1.PrinterDefault = True
CommonDialog1.ShowPrinter
For Raees = 1 To CommonDialog1.Copies
PrintForm
Next Raees
cancle:
End Sub

Private Sub Form_Load()
Set Raees(1) = LoadPicture("F:\project\images\5.jpg")
Set Raees(2) = LoadPicture("F:\project\images\6.jpg")
End Sub
Private Sub Picture2_Click()
Form11.Show
End Sub

Private Sub Picture3_Click()
Form12.Show
End Sub

Private Sub Picture4_Click()
Form13.Show
End Sub

Private Sub Picture5_Click()
Form14.Show
End Sub

Private Sub Timer1_Timer()
Label3.Caption = Date & "    " & Time
If i = 16 Then
i = 1
End If
Label1.ForeColor = QBColor(1)
i = i + 1
Label1.Left = Label1.Left + 100
If Label1.Left >= 19000 Then
   Label1.Left = 0
  End If
 
  If j = 16 Then
j = 1
End If
Label4.ForeColor = QBColor(j)
j = j + 1
Label4.Left = Label4.Left + 100
If Label4.Left >= 8000 - 900 Then
   Label4.Left = 6000
  End If
  If k = 16 Then
k = 1
End If
Label5.ForeColor = QBColor(k)
k = k + 1
Label5.Left = Label5.Left + 100
If Label5.Left >= 9000 + 600 Then
   Label5.Left = 7800 + 1000
  End If
   If l = 16 Then
l = 1
End If
Label6.ForeColor = QBColor(l)
l = l + 1
Label6.Left = Label6.Left + 100
If Label6.Left >= 9850 + 3000 - 500 Then
   Label6.Left = 9000 + 3000 - 300
  End If
   If m = 16 Then
m = 1
End If
Label7.ForeColor = QBColor(m)
m = m + 1
Label7.Left = Label7.Left + 100
If Label7.Left >= 9800 + 6000 - 900 Then
   Label7.Left = 8600 + 6000 - 700
  End If
   If n = 16 Then
n = 1
End If
Label2.ForeColor = QBColor(n)
n = n + 1
Label3.Left = Label2.Left + 100
If Label2.Left >= 9800 Then
   Label2.Left = 8600
  End If

End Sub

Private Sub Timer2_Timer()
Static Image1 As Boolean
If Image1 Then
Picture1.Picture = Raees(1)
Else
Picture1.Picture = Raees(2)
End If
Image1 = Not Image1
End Sub