|
-
Jul 2nd, 2000, 04:08 AM
#1
Thread Starter
Member
Hi there
Does anyone know how to create a progress bar that is completly solid instaed of the normal one which is in blocks? I mean something like the one you get when installing most apps.
-
Jul 2nd, 2000, 04:13 AM
#2
transcendental analytic
Do you mean to create a new control or to use one?
I believe kinjalgp have done one earlier, you could ask him.
For creating your own ActiveX OCX:
Code:
line(0,0)-(scalewidth*progress,scaleheight),forecolor,BF
Where progress is a value between 0 and 1
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jul 2nd, 2000, 04:18 AM
#3
Thread Starter
Member
Thats fine, but
Thanks kedaman, that's fine but is there no way of using the Windows API progress bar to change the style of it (I know how to change the colour, for example)
-
Jul 2nd, 2000, 04:46 AM
#4
transcendental analytic
AFAIK you cannot do that using windows api, but of course, progressbars are such easy things to do i.e you could do it with a simple picturebox, so why bother using api?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jul 2nd, 2000, 07:29 PM
#5
PowerPoster
Create your own color ProgressBar
Juz take a look on this thread
-
Jul 2nd, 2000, 08:28 PM
#6
_______
// example
'example of a progress bar using a picture box
'make a standard app and add a picture box called Progress
'in the PublicSub DoProgress..rename the frmSaveApps to your form name
'cut and paste the code and run to see an example
'
'<<<<<<< Put this in a bas module >>>>>>>>
'replace frmTips with the name of your app form
'or name your form frmTips for this example
Option Explicit
'number of things to do ex..files to be backed up
Public intCounted#
'
Public Sub DoProgress(Percent)
'
' Percent is % of graph
'
Dim Work As Integer
Dim Num As String
'
Work = Int(Abs(Percent))
If Work > 100 Then Work = 100
'
With frmSaveTips.Progress '<<< With application form
.BackColor = vbWhite '<<< White background
If Not .AutoRedraw Then '<<< picture in memory ?
.AutoRedraw = True '<<< make one
End If
.Cls '<<< clear picture in memory
.ScaleWidth = 100 '<<< new scalemodus
.DrawMode = 10 '<<< not XOR Pen Modus
Num = Format$(Work, "###") + "% Completed"
.CurrentX = 50 - .TextWidth(Num) / 2 '<<< %age is Centered
.CurrentY = (.ScaleHeight - .TextHeight(Num)) / 2
frmSaveTips.Progress.ForeColor = vbBlack '<<< Black text
frmSaveTips.Progress.Print Num '<<< print percent
frmSaveTips.Progress.Line (0, 0)-(Work, .ScaleHeight), vbBlue, BF
.Refresh '<<< show
End With
'
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' <<<<<<<<<<<< event code for form >>>>>>>>>>>>>>>>>>>
Private Sub Command1_Click()
intTotalCount = 1000 'whatever..use 1000 for this example
'print the line & increment the count
Dim i, copied
For i = 1 To 1000
Print "This is a progress bar sample!"
copied = copied + 1 'increment for progress bar
Call DoProgress(copied / intTotalCount * 100) 'progress bar set to 100
Next i
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jul 2nd, 2000, 10:36 PM
#7
Fanatic Member
Why won't you just change the Scrolling property to 1-ccScrollingSmooth?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|