'=========================================================== '= ProgBar Control V2.1 = '= ---------------------- = '= (C)2000 NJE = '= NE94252@netscape.net = '= = '= You may use this source code within your own = '= applications, just give me a shout. = '= You may not distribute it on a website or ftp site = '= without my express permission. The zip file now also = '= includes a compiled ocx for those who just want to use = '= the control and don't care about the code. The control = '= has been tested with VB 5 and 6. = '=========================================================== '= Latest Update 01/14/00 = '=========================================================== '= Updates: = '= -------- = '= V1.1 - Addition of the VerticalText property. = '= - General code clean up. = '= - Addition of the ability to play a wav = '= file at 100%. = '= V1.2 - Addition of gradient fill (BarStyle). = '= - All bar and background drawing handled = '= by APIs to speed things up. = '= - The ability to wait for the sound to = '= finish or not before releasing to code. = '= V1.2.1 - Fixed a problem with the use of = '= reserved words. = '= V2.0 - Used DCs to remove flicker. = '= - Added the font choice. = '= V2.1 - Added code to delete and recreate the = '= memory DC if the control is resized. = '=========================================================== '= RunTime Properties: (Aphabetical order) = '= ------------------- = '= BackColour - The back ground colour of the bar. = '= Standard colour range. = '= BarEndColour - The colour the bar fades into when the = '= 'BarStyle' is Gradient. = '= Standard colour range. = '= BarStartColour- The colour the bar fades from or the = '= colour of the bar if the 'BarStyle' is = '= Solid. Standard colour range. = '= BarStyle - The style of bar fill (gradient or = '= solid). = '= 0 = Gradiant, 1 = Solid. = '= BorderStyle - Standard border style. = '= 0 = Flat, 1 = ThreeD = '= FillDirection - The direction the bar should fill. = '= 0 = Up, 1 = Down, 2 = Left, 3 = Right = '= Font - The font to use for the text. = '= Standard font dialog. = '= FontColour - The colour of the text displayed. = '= Standard colour range. = '= Max - The upper limit of the bar. = '= Long value, -2147483648 to 2147483647 = '= Message - The message to display in the bar. = '= String. = '= Min - The lower limit of the progress bar. = '= Long value, -2147483648 to 2147483647 = '= Percent - The current bar percentage. = '= Byte value, 0 to 100 (obviously :)) = '= PlaySound - Flag to indicate the sound file = '= specified in the SoundToPlay property = '= sould be played when 100% is reached. = '= (TRUE, FALSE) = '= ShowMessage - Flag to indicate the message should be = '= shown. (TRUE, FALSE) = '= ShowPercent - Flag to incicate the current percentage = '= should be shown. (TRUE, FALSE) = '= ShowValue - Flag to indicate the current value = '= should be shown. (TRUE, FALSE) = '= SoundToPlay - A string value holding the path and = '= name of the wav file to play @ 100%. = '= Value - The current value of the progress bar. = '= Long value, -2147483648 to 2147483647 = '= VerticalText - Flag to indicate that the text should = '= be written top to bottom, useful for up = '= or down progress bars. (TRUE, FALSE) = '= WaitForSound - This flag indicates that the code will = '= susspend until the sound file played at = '= 100% has finished playing. If one's = '= set to play that is. (TRUE, FALSE) = '=========================================================== '= Notes: = '= ------ = '= 1. You can either show the percentage or value or = '= neither. You can't show both. Setting one will = '= disable the other. = '= 2. Setting the value above the 'Max' or below the 'Min' = '= will result in the value being set to the 'Max' or = '= 'Min'. = '= 3. Setting the percent above 100 or below 0 will result = '= in the percentage being changed to 100 or 0. = '= 4. Setting the 'Max' below the 'Min' will result in the = '= 'Max' being set to the 'Min' + 1. = '= 5. Setting the 'Min' below the 'Max' will result in the = '= 'Min' being set to the 'Max' - 1. = '= 6. Adjusting either the 'Max' or the 'Min' will cause = '= the 'Value' to be recalculated. = '= 7. If the 'BarStyle' is set to solid the colour of the = '= bar is defined by the 'BarStartColour' property. = '= 8. If a sound is playing and the flag to play one at = '= 100% is set the currently playing file will stop and = '= the specified one will start. = '=========================================================== '= Have fun! NJE = '==========================================================