Solved

SSPanel.FloodPercent

Posted on 1997-10-12
1
642 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

739 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