ni.com is currently experiencing unexpected issues.
Some services may be unavailable at this time.
01-11-2007 03:30 AM
01-11-2007 03:35 AM
@TK Chang wrote:
Hi:I intend to show a vi when my system call it but the backgound have color and I want it to be transparent. I search inside forum and get this thread http://forums.ni.com/ni/board/message?board.id=170&message.id=178411&query.id=105714#M178411 . After that I try follow that method using "call DLL" to let my front panel become transparent but I fail.I attach my vi and hope come one can help.thank in advance.
What version of LabVIEW do you have. In LabVIEW 8 this is a standard feature of VIs you can set in the VI Properties of your VI under Window Appearance->Customize->Window Runs Transparent.
Rolf Kalbermatter
01-11-2007 03:56 AM
01-11-2007 08:22 AM
Hi rolfk my LV version is .7.1
Thank tst that VI work but it make the whole windows transparent. What i want is that moving man and callout remain clear only the backgound become transparent.
Any suggestion?
01-11-2007 12:14 PM
The function displays white as transparent, so you can color the background white (it has to be pure white - 255, 255, 255) and set the transparency to 255 and the background will not be seen. Note: I don't know whether this is part of the design of the function or a bug.
Another option - you can use some of the Windows API functions to change the shape of a window (including to the shape of a bitmap). The problem with that is that your bitmap changes shape because the man moves. There were some VIs showing how to do this in one of the LTR challenges, but LTR was closed down and their stuff is no longer available. I might have these VIs somewhere and I can look for them in a few days if you want them.
01-11-2007 09:41 PM - edited 01-11-2007 09:41 PM
Message Edited by TK Chang on 01-11-2007 09:44 PM
01-12-2007 01:55 AM
@TK Chang wrote:
Thank a lot tst, it work.By the way I am try to understand how to use windows API. For example function "GetWindowLong" got 2 parameter one is "hWnd" I know is get the window name and the other "nIndex" I search in MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/wi...) but I can't figure out why the input value is "-20".Same as function "SetWindowlong" and "SetLayeredWindowAttributes". All these APi i can find the explaination in MSDN but I don't know what value I should put for those parameters. Is there anyway to find out what vaule I should give for those parameter?yes, if you can get that example for change bmp shape then pass to me.Thank very muchMessage Edited by TK Chang on 01-11-2007 09:44 PM
That is because Micrososft defined for readibility constants and usually only documents them in MSDN. If you want to know the numeric value (which you need when trying to call such a function from non-C environments) you basically have to install the plattform SDK from Microsoft and search in the headers for the constant name and see what value it has assigned too.
A search of the constant name as documented in the SDK on the web might sometimes also give results such as an include form for Visual Basic, and interface description for Delphi or simply C header files from some Wine patch, but there is no quarantee and you might have to look through many hits before finding something useful.
All these options do however require you to understand a bit about the syntax of the programming environment you got the solution from such as C syntax (the plattform SDK is completely for C(++) too), Delphi, or Visual Basic.
Rolf Kalbermatter
01-12-2007 09:54 PM
01-14-2007 01:35 AM
01-18-2007 09:14 PM