home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD7388732000.psc / SqlFileCopyWorking / PGB.frm (.txt) < prev   
Encoding:
Visual Basic Form  |  2000-02-11  |  10.6 KB  |  327 lines

  1. VERSION 5.00
  2. Begin VB.Form pgb 
  3.    ClientHeight    =   870
  4.    ClientLeft      =   2325
  5.    ClientTop       =   5565
  6.    ClientWidth     =   6645
  7.    ClipControls    =   0   'False
  8.    ControlBox      =   0   'False
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   870
  11.    ScaleWidth      =   6645
  12.    ShowInTaskbar   =   0   'False
  13.    Begin VB.PictureBox Picture1 
  14.       Height          =   430
  15.       Left            =   120
  16.       ScaleHeight     =   375
  17.       ScaleWidth      =   6375
  18.       TabIndex        =   0
  19.       Top             =   120
  20.       Width           =   6435
  21.       Begin VB.PictureBox Picture2 
  22.          Height          =   375
  23.          Index           =   19
  24.          Left            =   4560
  25.          ScaleHeight     =   315
  26.          ScaleWidth      =   195
  27.          TabIndex        =   20
  28.          Top             =   0
  29.          Width           =   255
  30.       End
  31.       Begin VB.PictureBox Picture2 
  32.          Height          =   375
  33.          Index           =   18
  34.          Left            =   4320
  35.          ScaleHeight     =   315
  36.          ScaleWidth      =   195
  37.          TabIndex        =   19
  38.          Top             =   0
  39.          Width           =   255
  40.       End
  41.       Begin VB.PictureBox Picture2 
  42.          Height          =   375
  43.          Index           =   17
  44.          Left            =   4080
  45.          ScaleHeight     =   315
  46.          ScaleWidth      =   195
  47.          TabIndex        =   18
  48.          Top             =   0
  49.          Width           =   255
  50.       End
  51.       Begin VB.PictureBox Picture2 
  52.          Height          =   375
  53.          Index           =   16
  54.          Left            =   3840
  55.          ScaleHeight     =   315
  56.          ScaleWidth      =   195
  57.          TabIndex        =   17
  58.          Top             =   0
  59.          Width           =   255
  60.       End
  61.       Begin VB.PictureBox Picture2 
  62.          Height          =   375
  63.          Index           =   15
  64.          Left            =   3600
  65.          ScaleHeight     =   315
  66.          ScaleWidth      =   195
  67.          TabIndex        =   16
  68.          Top             =   0
  69.          Width           =   255
  70.       End
  71.       Begin VB.PictureBox Picture2 
  72.          Height          =   375
  73.          Index           =   14
  74.          Left            =   3360
  75.          ScaleHeight     =   315
  76.          ScaleWidth      =   195
  77.          TabIndex        =   15
  78.          Top             =   0
  79.          Width           =   255
  80.       End
  81.       Begin VB.PictureBox Picture2 
  82.          Height          =   375
  83.          Index           =   13
  84.          Left            =   3120
  85.          ScaleHeight     =   315
  86.          ScaleWidth      =   195
  87.          TabIndex        =   14
  88.          Top             =   0
  89.          Width           =   255
  90.       End
  91.       Begin VB.PictureBox Picture2 
  92.          Height          =   375
  93.          Index           =   12
  94.          Left            =   2880
  95.          ScaleHeight     =   315
  96.          ScaleWidth      =   195
  97.          TabIndex        =   13
  98.          Top             =   0
  99.          Width           =   255
  100.       End
  101.       Begin VB.PictureBox Picture2 
  102.          Height          =   375
  103.          Index           =   11
  104.          Left            =   2640
  105.          ScaleHeight     =   315
  106.          ScaleWidth      =   195
  107.          TabIndex        =   12
  108.          Top             =   0
  109.          Width           =   255
  110.       End
  111.       Begin VB.PictureBox Picture2 
  112.          Height          =   375
  113.          Index           =   10
  114.          Left            =   2400
  115.          ScaleHeight     =   315
  116.          ScaleWidth      =   195
  117.          TabIndex        =   11
  118.          Top             =   0
  119.          Width           =   255
  120.       End
  121.       Begin VB.PictureBox Picture2 
  122.          Height          =   375
  123.          Index           =   9
  124.          Left            =   2160
  125.          ScaleHeight     =   315
  126.          ScaleWidth      =   195
  127.          TabIndex        =   10
  128.          Top             =   0
  129.          Width           =   255
  130.       End
  131.       Begin VB.PictureBox Picture2 
  132.          Height          =   375
  133.          Index           =   8
  134.          Left            =   1920
  135.          ScaleHeight     =   315
  136.          ScaleWidth      =   195
  137.          TabIndex        =   9
  138.          Top             =   0
  139.          Width           =   255
  140.       End
  141.       Begin VB.PictureBox Picture2 
  142.          Height          =   375
  143.          Index           =   7
  144.          Left            =   1680
  145.          ScaleHeight     =   315
  146.          ScaleWidth      =   195
  147.          TabIndex        =   8
  148.          Top             =   0
  149.          Width           =   255
  150.       End
  151.       Begin VB.PictureBox Picture2 
  152.          Height          =   375
  153.          Index           =   6
  154.          Left            =   1440
  155.          ScaleHeight     =   315
  156.          ScaleWidth      =   195
  157.          TabIndex        =   7
  158.          Top             =   0
  159.          Width           =   255
  160.       End
  161.       Begin VB.PictureBox Picture2 
  162.          Height          =   375
  163.          Index           =   5
  164.          Left            =   1200
  165.          ScaleHeight     =   315
  166.          ScaleWidth      =   195
  167.          TabIndex        =   6
  168.          Top             =   0
  169.          Width           =   255
  170.       End
  171.       Begin VB.PictureBox Picture2 
  172.          Height          =   375
  173.          Index           =   4
  174.          Left            =   960
  175.          ScaleHeight     =   315
  176.          ScaleWidth      =   195
  177.          TabIndex        =   5
  178.          Top             =   0
  179.          Width           =   255
  180.       End
  181.       Begin VB.PictureBox Picture2 
  182.          Height          =   375
  183.          Index           =   3
  184.          Left            =   720
  185.          ScaleHeight     =   315
  186.          ScaleWidth      =   195
  187.          TabIndex        =   4
  188.          Top             =   0
  189.          Width           =   255
  190.       End
  191.       Begin VB.PictureBox Picture2 
  192.          Height          =   375
  193.          Index           =   2
  194.          Left            =   480
  195.          ScaleHeight     =   315
  196.          ScaleWidth      =   195
  197.          TabIndex        =   3
  198.          Top             =   0
  199.          Width           =   255
  200.       End
  201.       Begin VB.PictureBox Picture2 
  202.          Height          =   375
  203.          Index           =   1
  204.          Left            =   240
  205.          ScaleHeight     =   315
  206.          ScaleWidth      =   195
  207.          TabIndex        =   2
  208.          Top             =   0
  209.          Width           =   255
  210.       End
  211.       Begin VB.PictureBox Picture2 
  212.          Height          =   375
  213.          Index           =   0
  214.          Left            =   0
  215.          ScaleHeight     =   315
  216.          ScaleWidth      =   195
  217.          TabIndex        =   1
  218.          Top             =   0
  219.          Width           =   255
  220.       End
  221.    End
  222.    Begin VB.Label lblPerc 
  223.       Alignment       =   2  'Center
  224.       Caption         =   "0% Completed"
  225.       BeginProperty Font 
  226.          Name            =   "MS Sans Serif"
  227.          Size            =   8.25
  228.          Charset         =   0
  229.          Weight          =   700
  230.          Underline       =   0   'False
  231.          Italic          =   0   'False
  232.          Strikethrough   =   0   'False
  233.       EndProperty
  234.       ForeColor       =   &H00FF0000&
  235.       Height          =   255
  236.       Left            =   120
  237.       TabIndex        =   21
  238.       Top             =   600
  239.       Width           =   6375
  240.    End
  241. Attribute VB_Name = "pgb"
  242. Attribute VB_GlobalNameSpace = False
  243. Attribute VB_Creatable = False
  244. Attribute VB_PredeclaredId = True
  245. Attribute VB_Exposed = False
  246. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  247. ' Author : Renier Barnard (renier_barnard@santam.co.za)
  248. ' Date    : July 1999
  249. ' Description :
  250. ' This code will demonstrate how to make a simple but nice
  251. ' looking progress bar. It could be more simple (Using the line command)
  252. ' but this looks better. The from_click event will start the progress bar of.
  253. ' Try resizing the progress bar form. There is some code to demonstrate
  254. ' how to make something like this generic in size !
  255. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  256. Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
  257. Const FLAGS = 1
  258. Const HWND_TOPMOST = -1
  259. Option Explicit
  260. Public Function Progress(Value, MaxValue, Optional color As ColorConstants)
  261. ' This is the actual progress bar function.
  262. Dim Perc
  263. Dim bb As Integer
  264. 'Me.Show
  265. 'Get a color to do it in
  266. If color = 0 Then color = vbBlue
  267. 'Now work out the percentage (0-100) of where we currently are
  268. Perc = (Value / MaxValue) * 100
  269. lblPerc.ForeColor = color
  270. DoEvents
  271. lblPerc.Caption = Int(Perc) & "% Completed" 'Just the Label Display
  272. Perc = Perc / 5
  273. Perc = Int(Perc)
  274. Perc = Perc - 1
  275. ' Now , fill the blocks that need to be filled
  276. For bb = 0 To 19
  277.     DoEvents
  278.     If bb <= Perc Then
  279.         Picture2(bb).BackColor = color ' Done
  280.     Else
  281.         Picture2(bb).BackColor = vbButtonFace ' Not yet Done
  282.     End If
  283. NeyFace ' Not yet Done
  284.     End If
  285. NeyFace ' Not yet Done
  286.     End If
  287. NeyFace ' Not yet Done
  288.     End If
  289. NeyFagB"
  290. Do ctur3o   vents
  291.     If ctn0(ee
  292. bromgB"
  293. Do ctu1bLt2ture2(bb).Bac_1gG6M _bb).Bac_1gG6M _bb).Bac_1gG6M _bb).Bac_1gG6M _bb).Bac_1gG6M _bb).Bac_1gG6M _bb).Bac_1gG6M _bb).Bac_1gG6M _bb).Bac_1gG6M _bb).Bac_1gG6M _bb).Bac_1gG6M _bb).Bac_1gG6M _bb).Bac_1gG6M _bb).Bac_1gG'''''''''''''''''''e
  294.    ControlBox   
  295. te:C=h 0) of where we currently are
  296. Perc_1gG6M _bb).Ba8nt(  
  297. te:C=h b).Bac_1g5n(''''''''x:C=h b)_bb).Bac_1gG6M _b''''x:C=h b)i)''''ress bar ot2ture2(bb).Bac_1gG6Mndex        =   21
  298.       Top             =   6ogG6M2c_1gts
  299.     Iigts
  300.     Iigts
  301.     Iigts
  302.     Iigts
  303.     Iigts
  304.     Iigts
  305.     Iigts
  306.     Iigts
  307.     Iigts
  308.     Iigts
  309.     Iigts
  310.     Iigts
  311.     Iigts
  312.     Iigts
  313.     Iigts
  314.     Iigts
  315.     Iigts
  316.     Iiglt As ColorConstants)
  317. ' This is the actual progress bar function.
  318. Dim Perc
  319. Dim bb As Integer
  320. 'Me.S_s betterc
  321.     Iig alNaaTop R,ireace ' Eh   Lahaai(bi(baFatrate how to make a simple but nice
  322. ' looking progress bar. It could be more simple (Using the line command)
  323. ' but this looks better. The from_click event will start the 
  324. 'Get a core2(yM )fsoeace ' Eh   Lahaai(bi(baFatrate how to make a simple but nice
  325. ' looking progress bar. It could be more si :C=h b)ahaai(bi(baFatrate how to make a simple but nice
  326. ' looking progress bar. It 
  327.