06-17-2009 12:15 PM
I'm just experimenting with creating a loading bar similar to that seen when you start up a Windows XP computer. It's still in its infancy, but i've got a couple of questions on it all the same.
06-17-2009 02:03 PM
James Mamakos wrote:I'm just experimenting with creating a loading bar similar to that seen when you start up a Windows XP computer. It's still in its infancy, but i've got a couple of questions on it all the same.
I've attached the rather basic VI. I still have the variables as controls so that i can play with it whilst it's running. I've also attached a simple Hexadecimal colour chart so you know what colours you're inputting (if you want to play too - you never know how much free time needs wasting! ;))
- Why, when the VI is run for the first time (or when run after stopping it with the 'abort' button), is the loading bar filled with the last colour rather than starting blank or for the bar to start at the beginning?
- Why is there a little segment on the left that is the same as the first colour whenever the bar is passing through that point?
- Why is the frame of the slide bars so thick when it's not that thick normally? (the loading bar effect is created by superimposing several slide bars on top of one another)
06-17-2009 02:15 PM
You may find this intresting
06-17-2009 09:05 PM
06-18-2009 03:38 AM
06-18-2009 04:11 AM
P.S. I've tried running the first few VIs from the thread using NET controls, but i think i get a similar problem to Mr. Jim in that i get the same error message which won't go away meaning i have to abort LabVIEW or let it stumble and crash! I cannot open or run the later solutions people provided since they're all in 8.6 - too big for my lowly 8.5! Could someone down-convert a few of the later ones please?
I initially tried accessing the windows progress bar(s) using ActiveX controls, but although i appear to be able to wire up the references and set their properties, when i try to run the VI i get an error at the first method/property node. The AxtiveX control references i've found which look(ed) hopeful are from the Microsoft Windows Common Controls 6.0 (SP4) Version 2.0 library. They are the ProgressBar (MSComctlLib.ProgCtrl.2), and the StatusBar (MSComctlLib.SBarCTRL.2). Any ideas for if i was to venture down this road or is this unwise?
06-18-2009 08:38 AM - edited 06-18-2009 08:41 AM
How could I simulate a progress bar with 256 'segments' (257 sliders)*? Either that, or is it possible to have a two-colour texture in one 'segment' where one colour at one end fades to the other colour at the other end? By 'segment', I mean the space between two sliders.
This is an attempted work-around for not having much success trying to use an ActiveX control reference for the windows progress/status bars.
* I'm not too keen on creating 256 progress bars to replicate my current method for getting a graduated colour fill on the slider!
06-18-2009 09:18 AM
James Mamakos wrote:I cannot open or run the later solutions people provided since they're all in 8.6 - too big for my lowly 8.5! Could someone down-convert a few of the later ones please?
Which ones? There were many that were posted. Since you said you are trying to make this compatible with 6.1 you won't be able to use them anyway since LabVIEW 6.1 does not support .NET.
The AxtiveX control references i've found which look(ed) hopeful are from the Microsoft Windows Common Controls 6.0 (SP4) Version 2.0 library. They are the ProgressBar (MSComctlLib.ProgCtrl.2), and the StatusBar (MSComctlLib.SBarCTRL.2). Any ideas for if i was to venture down this road or is this unwise?
The StatusBar is the wrong one to use. That's just what appears at the bottom of the window. Using the ProgressBar is fairly simple. Example.
How could I simulate a progress bar with 256 'segments' (257 sliders)*? Either that, or is it possible to have a two-colour texture in one 'segment' where one colour at one end fades to the other colour at the other end? By 'segment', I mean the space between two sliders.
This is an attempted work-around for not having much success trying to use an ActiveX control reference for the windows progress/status bars.
* I'm not too keen on creating 256 progress bars to replicate my current method for getting a graduated colour fill on the slider!
What is your ultimate goal? To get something that's compatible with 6.1 or to get a graduated color? Or both? The MS ActiveX ProgressBar will not be graduated, but it will work with 6.1. If you use a horizontal slide then you can create a bunch of sliders to get your graduated fill. Depending on how fast it's moving or how wide filled bar is you may not need 256 as the human eye may not be able to perceive a harsh jump in color if it's below the detection threshold.
06-18-2009 10:17 AM
@smercurio_fc wrote:
What is your ultimate goal? To get something that's compatible with 6.1 or to get a graduated color? Or both?
Both?! I've had several ideas but i think i've finally settled with a 'block' that loops across the bar in the style of marquee. The block's centre is of a particular colour and it graduates to the background colour in either direction.
@smercurio_fc wrote:
If you use a horizontal slide then you can create a bunch of sliders to get your graduated fill. Depending on how fast it's moving or how wide filled bar is you may not need 256 as the human eye may not be able to perceive a harsh jump in color if it's below the detection threshold.
This is what I've done for the smaller version I posted earlier, and I think I may end up doing something similar.You're probably right about not needing every colour gradient so I'll experiment a bit and see what I can get away with. I'll try using a mixture of array and cluster manipulation to make the code smaller.
I'll let you know how things develop. Thank you so far. 🙂
06-19-2009 04:28 AM