Solved

SSPanel.FloodPercent

Posted on 1997-10-12
1
649 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses
Course of the Month8 days, 4 hours left to enroll

617 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