home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 3_2004-2005.ISO / Data / Zips / Animated_C1775107282004.psc / Form1.frm < prev    next >
Text File  |  2004-07-12  |  5KB  |  153 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Animated Command Buttons - By Suresh Ramanujam"
  5.    ClientHeight    =   1605
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   5190
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   1605
  13.    ScaleWidth      =   5190
  14.    StartUpPosition =   2  'CenterScreen
  15.    Begin VB.CommandButton Command2 
  16.       Caption         =   "Wana Quit?"
  17.       Height          =   975
  18.       Left            =   3240
  19.       Style           =   1  'Graphical
  20.       TabIndex        =   3
  21.       Top             =   240
  22.       Width           =   1575
  23.    End
  24.    Begin VB.Timer Timer1 
  25.       Interval        =   100
  26.       Left            =   2040
  27.       Top             =   2280
  28.    End
  29.    Begin VB.CommandButton Command1 
  30.       BeginProperty Font 
  31.          Name            =   "MS Sans Serif"
  32.          Size            =   8.25
  33.          Charset         =   0
  34.          Weight          =   700
  35.          Underline       =   0   'False
  36.          Italic          =   0   'False
  37.          Strikethrough   =   0   'False
  38.       EndProperty
  39.       Height          =   975
  40.       Left            =   360
  41.       MaskColor       =   &H00E0E0E0&
  42.       Style           =   1  'Graphical
  43.       TabIndex        =   0
  44.       Top             =   240
  45.       Width           =   1575
  46.    End
  47.    Begin VB.Frame Frame1 
  48.       BeginProperty Font 
  49.          Name            =   "MS Sans Serif"
  50.          Size            =   8.25
  51.          Charset         =   0
  52.          Weight          =   700
  53.          Underline       =   0   'False
  54.          Italic          =   0   'False
  55.          Strikethrough   =   0   'False
  56.       EndProperty
  57.       Height          =   1575
  58.       Left            =   0
  59.       TabIndex        =   1
  60.       Top             =   0
  61.       Width           =   5175
  62.       Begin VB.Label Label2 
  63.          AutoSize        =   -1  'True
  64.          Caption         =   "Button With Caption"
  65.          BeginProperty Font 
  66.             Name            =   "MS Sans Serif"
  67.             Size            =   8.25
  68.             Charset         =   0
  69.             Weight          =   700
  70.             Underline       =   0   'False
  71.             Italic          =   0   'False
  72.             Strikethrough   =   0   'False
  73.          EndProperty
  74.          Height          =   195
  75.          Left            =   3240
  76.          TabIndex        =   4
  77.          Top             =   1320
  78.          Width           =   1725
  79.       End
  80.       Begin VB.Label Label1 
  81.          AutoSize        =   -1  'True
  82.          Caption         =   "Button Without Caption"
  83.          BeginProperty Font 
  84.             Name            =   "MS Sans Serif"
  85.             Size            =   8.25
  86.             Charset         =   0
  87.             Weight          =   700
  88.             Underline       =   0   'False
  89.             Italic          =   0   'False
  90.             Strikethrough   =   0   'False
  91.          EndProperty
  92.          Height          =   195
  93.          Left            =   120
  94.          TabIndex        =   2
  95.          Top             =   1320
  96.          Width           =   1995
  97.       End
  98.    End
  99. End
  100. Attribute VB_Name = "Form1"
  101. Attribute VB_GlobalNameSpace = False
  102. Attribute VB_Creatable = False
  103. Attribute VB_PredeclaredId = True
  104. Attribute VB_Exposed = False
  105. '***********************************************************
  106. '                      Animated Command Buttons            *
  107. '                                By                        *
  108. '                          Suresh Ramanujam                *
  109. '                                                          *
  110. '                                                          *
  111. '                               Contact:                   *
  112. '                       www.planetsourcecode.com           *
  113. '                    sureshramanujam@rediffmail.com        *
  114. '                                                          *
  115. '***********************************************************
  116.  
  117. Dim i As Integer    'counter to control frames
  118.  
  119. Private Sub Command1_Click()
  120.  'Alert
  121.  MsgBox "Gotcha!! At last i made it!!!!!!", , "Animated Command Buttons"
  122. End Sub
  123.  
  124. Private Sub Command2_Click()
  125. 'Alert
  126. ans = MsgBox("Howzat folks, really kooooooooollll????. Wait for more code. Bye!!!!", vbYesNo, "Animated Command Buttons")
  127.  
  128. If ans = vbYes Then
  129.     End
  130. End If
  131. End Sub
  132.  
  133. Private Sub Form_Load()
  134. i = 1
  135. 'Alert
  136. MsgBox "This is a simple code, which teaches you, how to animate ur command buttons. For more info. go through the readme.txt file. Please don forget to rate my code.", , "Animated Command Buttons"
  137. End Sub
  138.  
  139. ' This animates the command button
  140. Private Sub Timer1_Timer()
  141. If i > 12 Then              'check the counter
  142.     i = 1                   're-initialise
  143. Else
  144.     'load frame to command button1
  145.     Command1.Picture = LoadPicture(App.Path & "\mail" & i & ".bmp")
  146.     
  147.     'load frame to command button1
  148.     Command2.Picture = LoadPicture(App.Path & "\mail" & i & ".bmp")
  149.     
  150.     i = i + 1
  151. End If
  152. End Sub
  153.