home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Visual_Bas52585232002.psc / VB Tricks / frmMain.frm (.txt) next >
Encoding:
Visual Basic Form  |  2002-02-02  |  8.6 KB  |  242 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMain 
  3.    BorderStyle     =   0  'None
  4.    Caption         =   "Tricks"
  5.    ClientHeight    =   5310
  6.    ClientLeft      =   0
  7.    ClientTop       =   0
  8.    ClientWidth     =   7260
  9.    LinkTopic       =   "Form1"
  10.    Picture         =   "frmMain.frx":0000
  11.    ScaleHeight     =   5310
  12.    ScaleWidth      =   7260
  13.    StartUpPosition =   3  'Windows Default
  14.    Begin prjVBTricks.Button btnCancel 
  15.       Height          =   540
  16.       Left            =   5280
  17.       TabIndex        =   7
  18.       Top             =   1980
  19.       Width           =   1515
  20.       _ExtentX        =   2672
  21.       _ExtentY        =   953
  22.       Caption         =   "Cancel"
  23.    End
  24.    Begin prjVBTricks.Button btnOk 
  25.       Default         =   -1  'True
  26.       Height          =   540
  27.       Left            =   5280
  28.       TabIndex        =   6
  29.       Top             =   1380
  30.       Width           =   1575
  31.       _ExtentX        =   2778
  32.       _ExtentY        =   953
  33.       Caption         =   "Ok"
  34.    End
  35.    Begin VB.ListBox lstTricks 
  36.       BackColor       =   &H00C0C0FF&
  37.       ForeColor       =   &H00000080&
  38.       Height          =   2595
  39.       ItemData        =   "frmMain.frx":7D26E
  40.       Left            =   300
  41.       List            =   "frmMain.frx":7D270
  42.       TabIndex        =   1
  43.       Top             =   1380
  44.       Width           =   4935
  45.    End
  46.    Begin VB.Timer tmrTimer 
  47.       Enabled         =   0   'False
  48.       Interval        =   1
  49.       Left            =   0
  50.       Top             =   0
  51.    End
  52.    Begin VB.PictureBox picBGround 
  53.       Appearance      =   0  'Flat
  54.       BackColor       =   &H00000000&
  55.       BorderStyle     =   0  'None
  56.       ForeColor       =   &H80000008&
  57.       Height          =   375
  58.       Left            =   615
  59.       ScaleHeight     =   25
  60.       ScaleMode       =   3  'Pixel
  61.       ScaleWidth      =   396
  62.       TabIndex        =   3
  63.       TabStop         =   0   'False
  64.       Top             =   4620
  65.       Width           =   5940
  66.       Begin VB.PictureBox picMarquee 
  67.          Appearance      =   0  'Flat
  68.          AutoSize        =   -1  'True
  69.          BackColor       =   &H80000005&
  70.          BorderStyle     =   0  'None
  71.          ForeColor       =   &H80000008&
  72.          Height          =   300
  73.          Left            =   5940
  74.          Picture         =   "frmMain.frx":7D272
  75.          ScaleHeight     =   20
  76.          ScaleMode       =   3  'Pixel
  77.          ScaleWidth      =   748
  78.          TabIndex        =   4
  79.          TabStop         =   0   'False
  80.          Top             =   60
  81.          Width           =   11220
  82.       End
  83.    End
  84.    Begin VB.Label lblTitle 
  85.       Alignment       =   2  'Center
  86.       BackStyle       =   0  'Transparent
  87.       BeginProperty Font 
  88.          Name            =   "MS Sans Serif"
  89.          Size            =   18
  90.          Charset         =   0
  91.          Weight          =   700
  92.          Underline       =   0   'False
  93.          Italic          =   0   'False
  94.          Strikethrough   =   0   'False
  95.       EndProperty
  96.       ForeColor       =   &H00FF8080&
  97.       Height          =   435
  98.       Index           =   1
  99.       Left            =   240
  100.       TabIndex        =   5
  101.       Top             =   300
  102.       Width           =   6615
  103.    End
  104.    Begin VB.Label lblTricks 
  105.       Appearance      =   0  'Flat
  106.       BackColor       =   &H80000005&
  107.       BackStyle       =   0  'Transparent
  108.       Caption         =   "Tricks"
  109.       BeginProperty Font 
  110.          Name            =   "MS Sans Serif"
  111.          Size            =   9.75
  112.          Charset         =   0
  113.          Weight          =   700
  114.          Underline       =   0   'False
  115.          Italic          =   0   'False
  116.          Strikethrough   =   0   'False
  117.       EndProperty
  118.       ForeColor       =   &H00C0C0FF&
  119.       Height          =   315
  120.       Left            =   300
  121.       TabIndex        =   0
  122.       Top             =   1140
  123.       Width           =   3195
  124.    End
  125.    Begin VB.Label lblTitle 
  126.       Alignment       =   2  'Center
  127.       BackStyle       =   0  'Transparent
  128.       BeginProperty Font 
  129.          Name            =   "MS Sans Serif"
  130.          Size            =   18
  131.          Charset         =   0
  132.          Weight          =   700
  133.          Underline       =   0   'False
  134.          Italic          =   0   'False
  135.          Strikethrough   =   0   'False
  136.       EndProperty
  137.       ForeColor       =   &H00FFC0C0&
  138.       Height          =   435
  139.       Index           =   0
  140.       Left            =   255
  141.       TabIndex        =   2
  142.       Top             =   315
  143.       Width           =   6615
  144.    End
  145. Attribute VB_Name = "frmMain"
  146. Attribute VB_GlobalNameSpace = False
  147. Attribute VB_Creatable = False
  148. Attribute VB_PredeclaredId = True
  149. Attribute VB_Exposed = False
  150. '************************************************************************'
  151. '*                                                                      *'
  152. '*  Email : AJB2001LG@YAHOO.COM                                         *'
  153. '*                                                                      *'
  154. '*  Date Created :   February 1, 2002                                   *'
  155. '*  Date Finished:   February 3, 2002                                   *'
  156. '*                                                                      *'
  157. '*                                                                      *'
  158. '************************************************************************'
  159. Option Explicit ' all variables must be declared
  160. ' just wait for my next version.
  161. '=============================================================================================
  162. Dim OldMarqueeLeft As Integer ' old marquee left
  163. '=============================================================================================
  164. Private Sub Button1_Click()
  165. End Sub
  166. '=============================================================================================
  167. Private Sub Form_Load()
  168.     Dim i As Integer
  169.     ' Me.hWnd or  frmMain.hWnd - handle to a window
  170.     ' Me.Picture or frmMain.Picture - picture to be loaded
  171.     ' vbWhite - the color that specifies the transparent area
  172.     ShapedForm.Shape Me.hwnd, Me.Picture, vbWhite
  173.     For i = 1 To 11
  174.         lstTricks.AddItem "  " & "Trick #: " & Format$(i, "00")
  175.     Next i
  176.     lstTricks.ListIndex = lstTricks.TopIndex
  177.     OldMarqueeLeft = picMarquee.Left ' get old marquee left
  178.     tmrTimer.Enabled = True ' start the timer
  179. End Sub
  180. '=============================================================================================
  181. Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  182.     If Button And vbLeftButton Then DragObject Me.hwnd
  183. End Sub
  184. Private Sub Form_Unload(Cancel As Integer)
  185.     End
  186. End Sub
  187. '=============================================================================================
  188. Private Sub lblTitle_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  189.     Form_MouseDown vbLeftButton, 0, 0, 0
  190. End Sub
  191. '=============================================================================================
  192. Private Sub btnOk_Click()
  193.     Select Case lstTricks.ListIndex
  194.     Case Is = 0
  195.         frmTrick01.Show vbModal
  196.     Case Is = 1
  197.         frmTrick02.Show vbModal
  198.     Case Is = 2
  199.         frmTrick03.Show vbModal
  200.     Case Is = 3
  201.         frmTrick04.Show vbModal
  202.     Case Is = 4
  203.         frmTrick05.Show vbModal
  204.     Case Is = 5
  205.         frmTrick06.Show vbModal
  206.     Case Is = 6
  207.         frmTrick07.Show vbModal
  208.     Case Is = 7
  209.         frmTrick08.Show vbModal
  210.     Case Is = 8
  211.         frmTrick09.Show vbModal
  212.     Case Is = 9
  213.         frmTrick10.Show vbModal
  214.     Case Is = 10
  215.         Me.Hide ' hide the form to perform quick animation
  216.         frmTrick11.Show vbModal
  217.         Me.Show ' show the form
  218.     End Select
  219. End Sub
  220. '=============================================================================================
  221. Private Sub btnCancel_Click()
  222.     Unload Me
  223. End Sub
  224. Private Sub lstTricks_DblClick()
  225.     btnOk_Click
  226. End Sub
  227. '=============================================================================================
  228. Private Sub tmrTimer_Timer()
  229.     Static i As Integer
  230.     Dim Title As String
  231.     picMarquee.Left = picMarquee.Left - 1
  232.     If Abs(picMarquee.Left) >= picMarquee.Width Then _
  233.         picMarquee.Left = OldMarqueeLeft
  234.     Title = "VB Tricks ver 1.0"
  235.     If i <> Len(Title) Then
  236.         i = i + 1
  237.         lblTitle(0).Caption = Left(Title, i)
  238.         lblTitle(1).Caption = Left(Title, i)
  239.     End If
  240. End Sub
  241. '=============================================================================================
  242.