home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / likene1a / myprog2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-09-24  |  6.2 KB  |  231 lines

  1. VERSION 5.00
  2. Begin VB.Form Form12 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "My Prog"
  5.    ClientHeight    =   1560
  6.    ClientLeft      =   4605
  7.    ClientTop       =   3900
  8.    ClientWidth     =   3960
  9.    ControlBox      =   0   'False
  10.    FillStyle       =   0  'Solid
  11.    BeginProperty Font 
  12.       Name            =   "Arial"
  13.       Size            =   8.25
  14.       Charset         =   0
  15.       Weight          =   700
  16.       Underline       =   0   'False
  17.       Italic          =   0   'False
  18.       Strikethrough   =   0   'False
  19.    EndProperty
  20.    Icon            =   "myprog2.frx":0000
  21.    LinkTopic       =   "Form1"
  22.    MaxButton       =   0   'False
  23.    MinButton       =   0   'False
  24.    ScaleHeight     =   1560
  25.    ScaleWidth      =   3960
  26.    ShowInTaskbar   =   0   'False
  27.    Begin VB.TextBox Text3 
  28.       Height          =   315
  29.       Left            =   1560
  30.       TabIndex        =   8
  31.       Text            =   "URL"
  32.       Top             =   120
  33.       Width           =   2415
  34.    End
  35.    Begin VB.Timer Timer1 
  36.       Left            =   3720
  37.       Top             =   1560
  38.    End
  39.    Begin VB.TextBox Text2 
  40.       Height          =   315
  41.       Left            =   1560
  42.       TabIndex        =   7
  43.       Text            =   "Insert IP address here"
  44.       Top             =   480
  45.       Width           =   2415
  46.    End
  47.    Begin VB.CommandButton Command27 
  48.       Caption         =   "Mouse stuff"
  49.       Height          =   375
  50.       Left            =   2520
  51.       TabIndex        =   3
  52.       Top             =   1200
  53.       Width           =   1455
  54.    End
  55.    Begin VB.CommandButton Command6 
  56.       Caption         =   "Windows stuff"
  57.       Height          =   375
  58.       Left            =   2520
  59.       TabIndex        =   1
  60.       Top             =   840
  61.       Width           =   1455
  62.    End
  63.    Begin VB.CommandButton Command1 
  64.       Caption         =   "Connect"
  65.       Height          =   735
  66.       Left            =   1440
  67.       TabIndex        =   4
  68.       Top             =   840
  69.       Width           =   1095
  70.    End
  71.    Begin VB.CommandButton Command25 
  72.       Caption         =   "Exit"
  73.       Height          =   375
  74.       Left            =   0
  75.       TabIndex        =   2
  76.       Top             =   1200
  77.       Width           =   1455
  78.    End
  79.    Begin VB.CommandButton Command8 
  80.       Caption         =   "Miscellaneous"
  81.       Height          =   375
  82.       Left            =   0
  83.       TabIndex        =   0
  84.       Top             =   840
  85.       Width           =   1455
  86.    End
  87.    Begin VB.CommandButton Command2 
  88.       Caption         =   "Goto URL"
  89.       Height          =   375
  90.       Left            =   0
  91.       TabIndex        =   5
  92.       Top             =   480
  93.       Width           =   1455
  94.    End
  95.    Begin VB.CommandButton Command30 
  96.       Caption         =   "Open Pog."
  97.       Height          =   375
  98.       Left            =   0
  99.       TabIndex        =   6
  100.       Top             =   120
  101.       Width           =   1455
  102.    End
  103. Attribute VB_Name = "Form12"
  104. Attribute VB_GlobalNameSpace = False
  105. Attribute VB_Creatable = False
  106. Attribute VB_PredeclaredId = True
  107. Attribute VB_Exposed = False
  108. Dim mmflag As Boolean
  109. Dim sax As Integer
  110. Dim Say As Integer
  111. Private Sub Command11_Click()
  112. Load form2
  113. form2.Show
  114. End Sub
  115. Private Sub Command1_Click()
  116. Command30.Enabled = False
  117. Command2.Enabled = False
  118. Command8.Enabled = False
  119. Command6.Enabled = False
  120. Command27.Enabled = False
  121. If Command1.Caption = "Connect" Then
  122. Command1.Caption = "Connecting"
  123. ElseIf Command1.Caption = "Connecting" Then
  124. Command1.Caption = "Cancel"
  125. ElseIf Command1.Caption = "Cancel" Then
  126. Command1.Caption = "Connect"
  127. Form12.Caption = "My prog"
  128. End If
  129. If Command1.Caption = "Connecting" Then
  130. Command1.Enabled = False
  131. Form12.Caption = "Connecting"
  132. Dim pausetime As Integer
  133. pausetime = 5
  134. start = Timer
  135. Do While Timer < start + pausetime
  136.     DoEvents
  137.     Loop
  138.     finish = Timer
  139. Command1.Enabled = True
  140. Command1.Caption = "Cancel"
  141. Form12.Caption = "Connected"
  142. End If
  143. If Command1.Caption = "Cancel" Then
  144. Command30.Enabled = True
  145. Command2.Enabled = True
  146. Command8.Enabled = True
  147. Command6.Enabled = True
  148. Command27.Enabled = True
  149. End If
  150. End Sub
  151. Private Sub Command2_Click()
  152. Shell "start http://" & Text3.Text
  153. End Sub
  154. Private Sub Command27_Click()
  155. Load Form4
  156. Form4.Show
  157. End Sub
  158. Private Sub Command25_Click()
  159.     Call ImplodeForm(Me, 2, 500, 1)
  160.     End
  161.     Set Form1 = Nothing
  162. End Sub
  163. Private Sub Command3_Click()
  164. Load Form6
  165. Form6.Show
  166. Command6.Enabled = True
  167. Command2.Enabled = True
  168. Command8.Enabled = True
  169. Command27.Enabled = True
  170. Command12.Enabled = True
  171. Command1.Enabled = True
  172. Command18.Enabled = True
  173. Command21.Enabled = True
  174. Combo1.Enabled = True
  175. Text6.Enabled = True
  176. Text3.Enabled = True
  177. Form6.Hide
  178. Command3.Visible = False
  179. End Sub
  180. Private Sub Command30_Click()
  181. DirControls.Show
  182. End Sub
  183. Private Sub Command6_Click()
  184. Load form2
  185. form2.Show
  186. End Sub
  187. Private Sub Command8_Click()
  188. Load frmmain
  189. frmmain.Show
  190. End Sub
  191. Private Sub Form_Load()
  192. Load Me
  193. Command30.Enabled = False
  194. Command2.Enabled = False
  195. Command8.Enabled = False
  196. Command6.Enabled = False
  197. Command27.Enabled = False
  198. End Sub
  199. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  200. Call ImplodeForm(Me, 2, 500, 1)
  201. End Sub
  202. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  203.    Dim fml As Long
  204.    Dim fmt As Long
  205.    Dim a As Integer
  206.    If mmflag = True Then
  207.       fml = Me.Left: fmt = Me.Top
  208.       If X > sax Then Me.Left = fml + (X - sax)
  209.         If X < sax Then Me.Left = fml - (sax - X)
  210.       If Y > Say Then Me.Top = fmt + (Y - Say)
  211.       If Y < Say Then Me.Top = fmt - (Say - Y)
  212.    End If
  213.    End Sub
  214. Private Sub form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  215. If mmflag = False Then
  216.       sax = X
  217.       Say = Y
  218.       mmflag = True
  219.    End If
  220.    Me.MousePointer = vbSizePointer
  221.    Timer1.Enabled = False
  222.    End Sub
  223. Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  224.     mmflag = False
  225.    Me.MousePointer = vbDefault
  226. End Sub
  227. Private Sub Picture1_Click()
  228. Picturesave.Picture = Picture1.Picture
  229. Picture1.Picture = Picture2.Picture
  230. End Sub
  231.