00001 VERSION 5.00 00002 Begin VB.Form FormProgress 00003 BorderStyle = 3 'Fixed Dialog 00004 ClientHeight = 1485 00005 ClientLeft = 255 00006 ClientTop = 1410 00007 ClientWidth = 4560 00008 ClipControls = 0 'False 00009 ControlBox = 0 'False 00010 FillStyle = 0 'Solid 00011 Icon = "FormProgress.frx":0000 00012 MaxButton = 0 'False 00013 MinButton = 0 'False 00014 ScaleHeight = 1485 00015 ScaleWidth = 4560 00016 ShowInTaskbar = 0 'False 00017 StartUpPosition = 1 'CenterOwner 00018 Begin VB.Frame Frame1 00019 Height = 1395 00020 Left = 0 00021 TabIndex = 0 00022 Top = 0 00023 Width = 4545 00024 Begin VB.Shape Shape1 00025 BorderColor = &H8000000D& 00026 FillColor = &H00800000& 00027 FillStyle = 0 'Solid 00028 Height = 255 00029 Left = 1200 00030 Top = 840 00031 Width = 1335 00032 End 00033 Begin VB.Label Label1 00034 Caption = "Loading picture..." 00035 Height = 495 00036 Left = 240 00037 TabIndex = 1 00038 Top = 240 00039 Width = 3975 00040 End 00041 Begin VB.Image imgProgress 00042 BorderStyle = 1 'Fixed Single 00043 Height = 345 00044 Left = 240 00045 Top = 840 00046 Width = 3975 00047 End 00048 End 00049 End 00050 Attribute VB_Name = "FormProgress" 00051 Attribute VB_GlobalNameSpace = False 00052 Attribute VB_Creatable = False 00053 Attribute VB_PredeclaredId = True 00054 Attribute VB_Exposed = False 00055 00056 Option Explicit 00057 00058 Private max As Long 00059 Private space As Long 00060 Private toFill As Long 00061 00062 Private Sub Form_Load() 00063 space = imgProgress.Width - 50 00064 toFill = 0 00065 Shape1.Left = imgProgress.Left + 50 00066 Shape1.Top = imgProgress.Top + 50 00067 Shape1.Height = imgProgress.Height - 100 00068 Shape1.Width = 0 00069 Me.Show 00070 Me.Refresh 00071 End Sub 00072 00073 Public Sub setMax(val As Long) 00074 max = val 00075 End Sub 00076 00077 Public Sub update(val As Long) 00078 If (max <= 0) Then 00079 max = 50 00080 End If 00081 toFill = space / max * val 00082 If (toFill <= space) Then 00083 Shape1.Width = toFill 00084 End If 00085 End Sub 00086