Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SSPanel.FloodPercent

Posted on 1997-10-12
1
Medium Priority
?
654 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 300 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…
Suggested Courses

661 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