home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD80447232000.psc / PSSC1 / frmopt3final.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-07-13  |  4.4 KB  |  173 lines

  1. VERSION 5.00
  2. Begin VB.Form frmopt3final 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   9000
  7.    ClientLeft      =   0
  8.    ClientTop       =   0
  9.    ClientWidth     =   12000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   9000
  14.    ScaleWidth      =   12000
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   2  'CenterScreen
  17.    WindowState     =   2  'Maximized
  18.    Begin VB.Frame Frame1 
  19.       BackColor       =   &H00FFC0C0&
  20.       BorderStyle     =   0  'None
  21.       Height          =   5415
  22.       Left            =   2520
  23.       TabIndex        =   1
  24.       Top             =   1680
  25.       Width           =   7095
  26.       Begin VB.Image Image1 
  27.          Height          =   5415
  28.          Left            =   0
  29.          Stretch         =   -1  'True
  30.          Top             =   0
  31.          Width           =   7095
  32.       End
  33.    End
  34.    Begin VB.CommandButton Command1 
  35.       Caption         =   "EXIT"
  36.       Height          =   735
  37.       Left            =   2520
  38.       TabIndex        =   0
  39.       Top             =   840
  40.       Visible         =   0   'False
  41.       Width           =   1215
  42.    End
  43. Attribute VB_Name = "frmopt3final"
  44. Attribute VB_GlobalNameSpace = False
  45. Attribute VB_Creatable = False
  46. Attribute VB_PredeclaredId = True
  47. Attribute VB_Exposed = False
  48. Sub pause(interval)
  49. current = Timer
  50. Do While Timer - current < Val(interval)
  51. DoEvents
  52. End Sub
  53. Private Sub Command1_Click()
  54. frmOpenPicForOpt3.Show
  55. Me.Hide
  56. End Sub
  57. Private Sub Form_Click()
  58. ShowCursor (bShow = False) 'show mouse
  59. frmOpenPicForOpt3.Show
  60. Me.Hide
  61. End Sub
  62. Private Sub Form_Load()
  63. Me.Show
  64. On Error GoTo erhr
  65. 'load picture that was selected
  66. Image1.Picture = LoadPicture(frmOpenPicForOpt3.Dir1.Path + "\" + frmOpenPicForOpt3.File1.FileName)
  67. If frmDir.opt1.Value = True Then GoTo rtl
  68. If frmDir.opt2.Value = True Then GoTo ltr
  69. If frmDir.opt3.Value = True Then GoTo down
  70. If frmDir.opt4.Value = True Then GoTo up
  71. If frmDir.opt5.Value = True Then GoTo diag1
  72. If frmDir.opt6.Value = True Then GoTo diag2
  73. If frmDir.opt7.Value = True Then GoTo diag3
  74. If frmDir.opt8.Value = True Then GoTo diag4
  75. 'the following for statements are looped over and over
  76. 'and the if...then's are used to relocate the picture once it
  77. 'gets out of the screen!
  78. For i = 1 To 10000000
  79. On Command1.Value GoTo exlad
  80. Frame1.Left = Frame1.Left - 100
  81. pause 0.01
  82. If Frame1.Left < -6845 Then
  83. Frame1.Left = Me.Width
  84. End If
  85. Next i
  86. Exit Sub
  87. For i = 1 To 10000000
  88. On Command1.Value GoTo exlad
  89. Frame1.Left = Frame1.Left + 100
  90. pause 0.01
  91. If Frame1.Left > 11520 Then
  92. Frame1.Left = -6845
  93. End If
  94. Next i
  95. Exit Sub
  96. down:
  97. For i = 1 To 10000000
  98. On Command1.Value GoTo exlad
  99. Frame1.Top = Frame1.Top + 100
  100. pause 0.01
  101. If Frame1.Top > 8880 Then
  102. Frame1.Top = -6745
  103. End If
  104. Next i
  105. Exit Sub
  106. For i = 1 To 10000000
  107. On Command1.Value GoTo exlad
  108. Frame1.Top = Frame1.Top - 100
  109. pause 0.01
  110. If Frame1.Top < -6700 Then
  111. Frame1.Top = 8880
  112. End If
  113. Next i
  114. Exit Sub
  115. diag1:
  116. For i = 1 To 10000000
  117. On Command1.Value GoTo exlad
  118. Frame1.Top = Frame1.Top + 100
  119. Frame1.Left = Frame1.Left - 100
  120. pause 0.01
  121. If Frame1.Top > 8880 Then
  122. Frame1.Top = -6700: Frame1.Left = Me.Width
  123. End If
  124. Next i
  125. Exit Sub
  126. diag2:
  127. For i = 1 To 10000000
  128. On Command1.Value GoTo exlad
  129. Frame1.Top = Frame1.Top + 100
  130. Frame1.Left = Frame1.Left + 100
  131. pause 0.01
  132. If Frame1.Top > 8880 Then
  133. Frame1.Top = -6700: Frame1.Left = -6845
  134. End If
  135. Next i
  136. Exit Sub
  137. diag3:
  138. For i = 1 To 10000000
  139. On Command1.Value GoTo exlad
  140. Frame1.Top = Frame1.Top - 100
  141. Frame1.Left = Frame1.Left + 100
  142. pause 0.01
  143. If Frame1.Top < -6700 Then
  144. Frame1.Top = 8880: Frame1.Left = -6845
  145. End If
  146. Next i
  147. Exit Sub
  148. diag4:
  149. For i = 1 To 10000000
  150. On Command1.Value GoTo exlad
  151. Frame1.Top = Frame1.Top - 100
  152. Frame1.Left = Frame1.Left - 100
  153. pause 0.01
  154. If Frame1.Top < -6700 Then
  155. Frame1.Top = 8880: Frame1.Left = Me.Width
  156. End If
  157. Next i
  158. Exit Sub
  159. erhr:
  160. MsgBox "An Error Occured.  Please check to see that the picture you chose was NOT directly in a drive, but rather in a folder.  This may have caused the error, and if not, then I don't know what to tell you!", vbCritical + vbOKOnly, "Error:"
  161. Me.Hide
  162. frmOpenPicForOpt3.Show
  163. Exit Sub
  164. exlad:
  165. frmOpenPicForOpt3.Show
  166. Me.Hide
  167. End Sub
  168. Private Sub Image1_Click()
  169. ShowCursor (bShow = False) 'show mouse!
  170. frmOpenPicForOpt3.Show
  171. Me.Hide
  172. End Sub
  173.