Solved

SSPanel.FloodPercent

Posted on 1997-10-12
1
633 Views
Last Modified: 2011-10-03
I'm using VB 4.0.

I'm using a SSPanel to show how many percent of my database is sorted.
I want to automatic change color on the percent when the floodmeter comes over it.
Ex. FloodColor is blue. When the meter comes over the percent I want it to change the color of the first digit in the percent to white and so on.
I don't want to change the forecolor for the whole SSPanel. Just one digit at one time, depending on the floodmeters position.

Hope you understand my question.
0
Comment
Question by:a96parbr
1 Comment
 
LVL 1

Accepted Solution

by:
lmarceau earned 100 total points
ID: 1437349
The SSPanel won't allow you to do want you want to do. Want you have seen is all it has to offer. Furtermore, changing one digit at would not create the effect you want to create: the same effect as with most setup porgram where the digit change color one pixel colum at time.

There are two easy ways to do that.
One, make the background of a picture box white, the numbers dark blue  (&H800000) and the bar also blue. But paint the with a nxor drawmode (drawmode =10). With that effect, the dark blue will turn into white and the white will turn into dark blue. It won't work with any other combinison of color, just white and dark blue. If you want the full code go check the vb\setupkit\setup1\setup1.bas file and look at the function UpdateStatus.

Second way, which can handle any color is to place one picture box on your form with the desired background color (let say vbButtonTop) and the 3d effect turned on. Set the foreground color to the color of the text we the % is under 50 (let say vbWindowText). That will be your picProgressBox.

Then inside it, place another picturebox, no 3d effects, no borders, and select the chosen backgound color for the bar (let say vbHighlight). Set the foreground color to the color of the text after 50% (let say vbHighlightText). That will be your picProgressBar.

Assure that picProgressBar is INSIDE picProgressBox.
set the position of picProgressBar to: top=0 left=0 height=picProgressBox.ScaleHeight, widht= 0
(Make them both the same height)

Now, to make it happen, just widthen picProgressBar from 0 to picProgressBox.Scalewidth. this will make the progress bar walk toward the left. And the last step is to print the percent value at the same place in both picturebox: print it in picProgressBar AND in picProgressBox. This will do the trick.

Try it, it works wonder! It gives a nice progress bar watever the system color are set to.






0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now