01-04-2009 02:39 PM - edited 01-04-2009 02:46 PM
Since there are few contributions to this thread, I'll give the solution to the original question : the answer is 0x01000037.
This is simply the hex code for the chameleon color (d16777271, although it appears as R0:G0:B0 in the LabVIEW color picker).
It makes a front panel or diagram object adopt the background color (and not the color of the underlying FP object).
I found the idea on the LabVIEW wiki (although there was originaly a confusion with transparency...). The use of the system label was suggested to create labels for the diagram wires as a form of code commenting. Of course you can also use it to dig holes through FP or diagram objects !..
01-04-2009 03:34 PM
chilly charly wrote:This is simply the hex code for the chameleon color
Ah, that's good to know.
(Now, how would you punch a hole all the way to the computer desktop? 🐵
chilly charly wrote:The creation of round holes is a bit more complicated... 😉
We can possibly get some clues by looking at the hierarchy in tst's solution. Can we?
01-05-2009 03:41 AM
While I did know about the system label color, I have to admit I didn't think about it, maybe because I already had code which needed only a couple of minutes of modification to do your first example. There are also problems with the system label color (e.g. it only works on the background image and it doesn't work inside tab controls).
As I mentioned, those who know what they're doing can get some details from my example. Also, I decided to choose a password which would be simple, so the first to figure it out is welcome to post an image of part of the BD.
01-05-2009 04:08 AM
01-05-2009 04:33 AM - edited 01-05-2009 04:34 AM
01-05-2009 06:15 AM
Matthew Kelton wrote:
I am assuming it uses several of the WinAPI functions tst is referring to.
I was actually thinking of using these functions, but didn't feel like working out exactly how to create the right shape, so I went down another (actually simpler, and one which I probably should have thought of first) path.
01-05-2009 08:08 AM - edited 01-05-2009 08:10 AM
Here's tst's BD for the beef of his code.
01-05-2009 09:58 AM
Since you've gone and exposed the important bits, you might as well post the password as well.
P.S. This was quick code written from scratch, since I didn't have anything which would have done the round hole. That's why it's not documented and not particularly clean. It's quite possible that there are more efficient ways of doing this.
01-05-2009 10:45 AM
01-12-2009 11:29 AM
For those wondering, the Windows API function used to cut a hole in the window can be seen here. One of its parameters is a color input (I believe in that example that color is a constant) and when you use a color and make the panel opaque, everything of that color in the window becomes completely transparent. You can even click through it to whatever's below the window.
You should note that the VI posted there was just a quick example. It needs work and cleaning up.