home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / ACTPROG.ZIP / Form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-09-21  |  5.4 KB  |  165 lines

  1. VERSION 5.00
  2. Object = "{CC1E317A-3102-11D1-816E-00A024E95548}#3.0#0"; "ACTIVEPROGRESS.OCX"
  3. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
  4. Begin VB.Form Form1 
  5.    BorderStyle     =   3  'Fixed Dialog
  6.    Caption         =   "ActiveProgress Bar Demo"
  7.    ClientHeight    =   3195
  8.    ClientLeft      =   45
  9.    ClientTop       =   330
  10.    ClientWidth     =   4680
  11.    FillColor       =   &H0000FFFF&
  12.    FillStyle       =   3  'Vertical Line
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   3195
  17.    ScaleWidth      =   4680
  18.    ShowInTaskbar   =   0   'False
  19.    StartUpPosition =   3  'Windows Default
  20.    Begin ActiveProgressBar.AXProgress AXProgress3 
  21.       Height          =   540
  22.       Left            =   360
  23.       Top             =   2520
  24.       Width           =   3795
  25.       _ExtentX        =   6694
  26.       _ExtentY        =   953
  27.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  28.          Name            =   "MS Sans Serif"
  29.          Size            =   8.25
  30.          Charset         =   0
  31.          Weight          =   400
  32.          Underline       =   0   'False
  33.          Italic          =   0   'False
  34.          Strikethrough   =   0   'False
  35.       EndProperty
  36.       Picture         =   "Form1.frx":0000
  37.       FillStyle       =   1
  38.       Max             =   100
  39.       Value           =   75
  40.    End
  41.    Begin ActiveProgressBar.AXProgress AXProgress1 
  42.       Height          =   255
  43.       Left            =   720
  44.       Top             =   1680
  45.       Width           =   3165
  46.       _ExtentX        =   5583
  47.       _ExtentY        =   450
  48.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  49.          Name            =   "MS Sans Serif"
  50.          Size            =   8.25
  51.          Charset         =   0
  52.          Weight          =   400
  53.          Underline       =   0   'False
  54.          Italic          =   0   'False
  55.          Strikethrough   =   0   'False
  56.       EndProperty
  57.       Picture         =   "Form1.frx":0452
  58.       Max             =   100
  59.       Value           =   75
  60.    End
  61.    Begin VB.CommandButton Command1 
  62.       Caption         =   "Start"
  63.       Height          =   375
  64.       Left            =   1800
  65.       TabIndex        =   0
  66.       Top             =   120
  67.       Width           =   975
  68.    End
  69.    Begin VB.Timer Timer1 
  70.       Enabled         =   0   'False
  71.       Interval        =   100
  72.       Left            =   840
  73.       Top             =   3000
  74.    End
  75.    Begin ComctlLib.ProgressBar ProgressBar1 
  76.       Height          =   255
  77.       Left            =   720
  78.       TabIndex        =   1
  79.       Top             =   840
  80.       Width           =   3135
  81.       _ExtentX        =   5530
  82.       _ExtentY        =   450
  83.       _Version        =   327682
  84.       Appearance      =   0
  85.    End
  86.    Begin ActiveProgressBar.AXProgress AXProgress2 
  87.       Height          =   420
  88.       Left            =   240
  89.       Top             =   2040
  90.       Width           =   4020
  91.       _ExtentX        =   7091
  92.       _ExtentY        =   741
  93.       ForeColor       =   255
  94.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  95.          Name            =   "MS Sans Serif"
  96.          Size            =   8.25
  97.          Charset         =   0
  98.          Weight          =   700
  99.          Underline       =   0   'False
  100.          Italic          =   0   'False
  101.          Strikethrough   =   0   'False
  102.       EndProperty
  103.       FillColor       =   65535
  104.       Picture         =   "Form1.frx":046E
  105.       FillStyle       =   1
  106.       Max             =   100
  107.       Value           =   75
  108.       CaptionStyle    =   1
  109.    End
  110.    Begin VB.Label Label2 
  111.       Caption         =   "Active Progress Bars"
  112.       Height          =   255
  113.       Left            =   720
  114.       TabIndex        =   3
  115.       Top             =   1440
  116.       Width           =   3135
  117.    End
  118.    Begin VB.Label Label1 
  119.       Caption         =   "Standard progress bar that ships with VB"
  120.       Height          =   255
  121.       Left            =   720
  122.       TabIndex        =   2
  123.       Top             =   600
  124.       Width           =   3135
  125.    End
  126. Attribute VB_Name = "Form1"
  127. Attribute VB_GlobalNameSpace = False
  128. Attribute VB_Creatable = False
  129. Attribute VB_PredeclaredId = True
  130. Attribute VB_Exposed = False
  131. Private Sub Command1_Click()
  132. AXProgress1.Value = 0
  133. Timer1.Enabled = True
  134. End Sub
  135. Private Sub Picture1_Click()
  136. End Sub
  137. Private Sub Form_Load()
  138.     'Set AXProgress Bar properties
  139.     AXProgress2.Min = AXProgress1.Min
  140.     AXProgress2.Max = AXProgress1.Max
  141.     AXProgress3.Min = AXProgress1.Min
  142.     AXProgress3.Max = AXProgress1.Max
  143.     'Set up Common windows progress bar properties
  144.     ProgressBar1.Min = AXProgress1.Min
  145.     ProgressBar1.Max = AXProgress1.Max
  146.     AXProgress1.Value = 0
  147.     AXProgress2.Value = 0
  148.     AXProgress3.Value = 0
  149. End Sub
  150. Private Sub Timer1_Timer()
  151.   'Adjust progress bar values
  152.   If AXProgress1.Value < AXProgress1.Max Then
  153.     AXProgress1.Value = AXProgress1.Value + 1
  154.   End If
  155.   AXProgress2.Value = AXProgress1.Value
  156.   AXProgress3.Value = AXProgress1.Value
  157.   ProgressBar1.Value = AXProgress1.Value
  158.   'Set form caption to percent complete using the
  159.   'AXProgress PercentComplete property.
  160.   Me.Caption = AXProgress1.PercentComplete & "% Completed"
  161.   If AXProgress1.Value = AXProgress1.Max Then
  162.     Timer1.Enabled = False
  163.   End If
  164. End Sub
  165.