www.pudn.com > progressbar.rar > frmSecondary.frm, change:2000-09-27,size:13588b


VERSION 5.00 
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX" 
Begin VB.Form frmSecondary  
   BackColor       =   &H00000000& 
   BorderStyle     =   0  'None 
   ClientHeight    =   3255 
   ClientLeft      =   0 
   ClientTop       =   0 
   ClientWidth     =   4695 
   Icon            =   "frmSecondary.frx":0000 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   3255 
   ScaleWidth      =   4695 
   ShowInTaskbar   =   0   'False 
   StartUpPosition =   2  'CenterScreen 
   Begin MSComDlg.CommonDialog dlgColors  
      Left            =   4080 
      Top             =   840 
      _ExtentX        =   847 
      _ExtentY        =   847 
      _Version        =   393216 
      CancelError     =   -1  'True 
      Flags           =   2 
   End 
   Begin VB.HScrollBar hscValue  
      Height          =   225 
      LargeChange     =   10 
      Left            =   1470 
      Max             =   100 
      TabIndex        =   9 
      Top             =   2295 
      Value           =   100 
      Width           =   2955 
   End 
   Begin VB.TextBox txtMin  
      Alignment       =   2  'Center 
      BackColor       =   &H00000000& 
      BorderStyle     =   0  'None 
      ForeColor       =   &H0080C0FF& 
      Height          =   195 
      Left            =   1560 
      MaxLength       =   5 
      TabIndex        =   7 
      Text            =   "0" 
      Top             =   1830 
      Width           =   495 
   End 
   Begin VB.TextBox txtMax  
      Alignment       =   2  'Center 
      BackColor       =   &H00000000& 
      BorderStyle     =   0  'None 
      ForeColor       =   &H0080C0FF& 
      Height          =   195 
      Left            =   1560 
      MaxLength       =   5 
      TabIndex        =   5 
      Text            =   "100" 
      Top             =   1350 
      Width           =   495 
   End 
   Begin pCoolProgressBar_Demo.CoolProgressBar cpbProgress  
      Height          =   255 
      Left            =   360 
      TabIndex        =   0 
      Top             =   2700 
      Width           =   3975 
      _ExtentX        =   7011 
      _ExtentY        =   450 
      BackColor       =   0 
      Color2          =   8438015 
      Color1          =   128 
   End 
   Begin VB.Label lblX  
      Alignment       =   2  'Center 
      BackColor       =   &H00000000& 
      BackStyle       =   0  'Transparent 
      Caption         =   "X" 
      BeginProperty Font  
         Name            =   "Times New Roman" 
         Size            =   9 
         Charset         =   0 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      ForeColor       =   &H000080FF& 
      Height          =   255 
      Left            =   4320 
      TabIndex        =   12 
      ToolTipText     =   "Close" 
      Top             =   120 
      Width           =   255 
   End 
   Begin VB.Shape Shape9  
      BackColor       =   &H00000000& 
      BackStyle       =   1  'Opaque 
      BorderColor     =   &H000040C0& 
      Height          =   255 
      Left            =   4320 
      Shape           =   4  'Rounded Rectangle 
      Top             =   120 
      Width           =   255 
   End 
   Begin VB.Label lblColor2  
      BackStyle       =   0  'Transparent 
      Height          =   255 
      Left            =   4200 
      TabIndex        =   11 
      Top             =   1800 
      Width           =   255 
   End 
   Begin VB.Label lblColor1  
      BackStyle       =   0  'Transparent 
      Height          =   255 
      Left            =   4200 
      TabIndex        =   10 
      Top             =   1320 
      Width           =   255 
   End 
   Begin VB.Shape Shape8  
      BackColor       =   &H00000000& 
      BorderColor     =   &H000080FF& 
      FillColor       =   &H00C0E0FF& 
      FillStyle       =   0  'Solid 
      Height          =   255 
      Left            =   1440 
      Shape           =   4  'Rounded Rectangle 
      Top             =   2280 
      Width           =   3015 
   End 
   Begin VB.Shape Shape7  
      BackColor       =   &H00000000& 
      BorderColor     =   &H000080FF& 
      Height          =   255 
      Left            =   240 
      Shape           =   4  'Rounded Rectangle 
      Top             =   2280 
      Width           =   4215 
   End 
   Begin VB.Label Label6  
      Alignment       =   2  'Center 
      BackColor       =   &H00000000& 
      BackStyle       =   0  'Transparent 
      Caption         =   "Value:" 
      BeginProperty Font  
         Name            =   "Times New Roman" 
         Size            =   14.25 
         Charset         =   0 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      ForeColor       =   &H00C0E0FF& 
      Height          =   255 
      Left            =   360 
      TabIndex        =   8 
      Top             =   2280 
      Width           =   1095 
   End 
   Begin VB.Shape Shape6  
      BackColor       =   &H00000000& 
      BorderColor     =   &H000080FF& 
      Height          =   255 
      Left            =   240 
      Shape           =   4  'Rounded Rectangle 
      Top             =   1800 
      Width           =   1935 
   End 
   Begin VB.Label Label5  
      Alignment       =   2  'Center 
      BackColor       =   &H00000000& 
      BackStyle       =   0  'Transparent 
      Caption         =   "Min:" 
      BeginProperty Font  
         Name            =   "Times New Roman" 
         Size            =   14.25 
         Charset         =   0 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      ForeColor       =   &H00C0E0FF& 
      Height          =   255 
      Left            =   360 
      TabIndex        =   6 
      Top             =   1800 
      Width           =   1095 
   End 
   Begin VB.Shape Shape5  
      BackColor       =   &H00000000& 
      BorderColor     =   &H000080FF& 
      Height          =   255 
      Left            =   240 
      Shape           =   4  'Rounded Rectangle 
      Top             =   1320 
      Width           =   1935 
   End 
   Begin VB.Label Label4  
      Alignment       =   2  'Center 
      BackColor       =   &H00000000& 
      BackStyle       =   0  'Transparent 
      Caption         =   "Max:" 
      BeginProperty Font  
         Name            =   "Times New Roman" 
         Size            =   14.25 
         Charset         =   0 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      ForeColor       =   &H00C0E0FF& 
      Height          =   255 
      Left            =   360 
      TabIndex        =   4 
      Top             =   1320 
      Width           =   1095 
   End 
   Begin VB.Shape Shape4  
      BackColor       =   &H00000000& 
      BorderColor     =   &H000080FF& 
      Height          =   855 
      Left            =   240 
      Shape           =   4  'Rounded Rectangle 
      Top             =   240 
      Width           =   4215 
   End 
   Begin VB.Label Label3  
      Alignment       =   2  'Center 
      BackColor       =   &H00000000& 
      BackStyle       =   0  'Transparent 
      Caption         =   "Here you can choose the progress bar's Colors, Max, Min and Value (press [Enter] to apply)." 
      BeginProperty Font  
         Name            =   "Times New Roman" 
         Size            =   12 
         Charset         =   0 
         Weight          =   700 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      ForeColor       =   &H00C0E0FF& 
      Height          =   855 
      Left            =   240 
      TabIndex        =   3 
      Top             =   240 
      Width           =   4215 
   End 
   Begin VB.Shape shpColor2  
      BackColor       =   &H00000000& 
      BackStyle       =   1  'Opaque 
      BorderColor     =   &H000080FF& 
      FillColor       =   &H0080C0FF& 
      FillStyle       =   0  'Solid 
      Height          =   255 
      Left            =   4200 
      Shape           =   4  'Rounded Rectangle 
      Top             =   1800 
      Width           =   255 
   End 
   Begin VB.Shape Shape2  
      BackColor       =   &H00000000& 
      BorderColor     =   &H000080FF& 
      Height          =   255 
      Left            =   2400 
      Shape           =   4  'Rounded Rectangle 
      Top             =   1800 
      Width           =   2055 
   End 
   Begin VB.Label Label2  
      Alignment       =   2  'Center 
      BackColor       =   &H00000000& 
      BackStyle       =   0  'Transparent 
      Caption         =   "Second color:" 
      BeginProperty Font  
         Name            =   "Times New Roman" 
         Size            =   14.25 
         Charset         =   0 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      ForeColor       =   &H00C0E0FF& 
      Height          =   255 
      Left            =   2400 
      TabIndex        =   2 
      Top             =   1800 
      Width           =   1815 
   End 
   Begin VB.Shape shpColor1  
      BackColor       =   &H00000000& 
      BackStyle       =   1  'Opaque 
      BorderColor     =   &H000080FF& 
      FillColor       =   &H00000080& 
      FillStyle       =   0  'Solid 
      Height          =   255 
      Left            =   4200 
      Shape           =   4  'Rounded Rectangle 
      Top             =   1320 
      Width           =   255 
   End 
   Begin VB.Shape Shape1  
      BackColor       =   &H00000000& 
      BorderColor     =   &H000080FF& 
      Height          =   255 
      Left            =   2400 
      Shape           =   4  'Rounded Rectangle 
      Top             =   1320 
      Width           =   2055 
   End 
   Begin VB.Label Label1  
      Alignment       =   2  'Center 
      BackColor       =   &H00000000& 
      BackStyle       =   0  'Transparent 
      Caption         =   "First color:" 
      BeginProperty Font  
         Name            =   "Times New Roman" 
         Size            =   14.25 
         Charset         =   0 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      ForeColor       =   &H00C0E0FF& 
      Height          =   255 
      Left            =   2400 
      TabIndex        =   1 
      Top             =   1320 
      Width           =   1815 
   End 
   Begin VB.Shape Shape3  
      BackColor       =   &H00000000& 
      BackStyle       =   1  'Opaque 
      BorderColor     =   &H000080FF& 
      Height          =   375 
      Left            =   240 
      Shape           =   4  'Rounded Rectangle 
      Top             =   2640 
      Width           =   4215 
   End 
End 
Attribute VB_Name = "frmSecondary" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
 
Private Sub txtMax_KeyPress(KeyAscii As Integer) 
    If KeyAscii < 48 And KeyAscii > 57 And KeyAscii <> 8 Then 'It's a number or backspace 
        'Beep and delete the invalid character 
        KeyAscii = 0 
    ElseIf KeyAscii = 13 Or KeyAscii = 10 Then 'User pressed Enter 
        'Set the Max values 
        hscValue.Max = Int(txtMax.Text) 
        cpbProgress.Max = Int(txtMax.Text) 
    End If 
End Sub 
 
Private Sub txtMin_KeyPress(KeyAscii As Integer) 
    If KeyAscii < 48 And KeyAscii > 57 And KeyAscii <> 8 Then 'It's a number or backspace 
        'Beep and delete the invalid character 
        Beep 
        KeyAscii = 0 
    ElseIf KeyAscii = 13 Or KeyAscii = 10 Then 'User pressed Enter 
        'Set the Max values 
        hscValue.Min = Int(txtMin.Text) 
        cpbProgress.Min = Int(txtMin.Text) 
    End If 
End Sub 
 
Private Sub hscValue_GotFocus() 
    'This will prevent the scroll bar flashing 
    'when it gets focus 
    cpbProgress.SetFocus 
End Sub 
 
Private Sub hscValue_Change() 
    'Change the value 
    cpbProgress.Value = hscValue.Value 
End Sub 
 
Private Sub hscValue_Scroll() 
    'Change the value 
    cpbProgress.Value = hscValue.Value 
End Sub 
 
Private Sub lblColor1_Click() 
    On Error GoTo UserCanceled 
     
    'Set the dialog's color 
    dlgColors.Color = shpColor1.FillColor 
     
    'Show the dialog 
    dlgColors.ShowColor 
     
    'Set the new color 
    shpColor1.FillColor = dlgColors.Color 
    cpbProgress.Color1 = dlgColors.Color 
     
UserCanceled: 
End Sub 
 
Private Sub lblColor2_Click() 
    On Error GoTo UserCanceled 
     
    'Set the dialog's color 
    dlgColors.Color = shpColor2.FillColor 
     
    'Show the dialog 
    dlgColors.ShowColor 
     
    'Set the new color 
    shpColor2.FillColor = dlgColors.Color 
    cpbProgress.Color2 = dlgColors.Color 
     
UserCanceled: 
End Sub 
 
Private Sub lblX_Click() 
    'Hide this form and display the message box 
    Unload Me 
    frmMsgbox.Show 
End Sub