04-06-2007 03:40 PM
04-10-2007 12:39 AM
04-14-2007 02:44 PM
04-14-2007 03:27 PM
@BryanL wrote:Hi Emilie,Also, is there a way to find the window names of all open windows including not only labview vi windows but also windows from other applications? Some of my non labview applications will have their names changed dynamically during execution. I need to know their exact name to access them in a vi.
04-14-2007 05:39 PM
04-14-2007 05:50 PM
Don't try to write a VI to call that function. That function requires a callback function pointer, something that is more or less impossible (well you can get it done but it is not worth the trouble) to create in LabVIEW. You will need an external DLL that does the enumeration and returns an array of strings to LabVIEW.
@BryanL wrote:Hi Rolf, thanks for the info. I will try to build a vi to call that function. For a more immediate need, I can use a downloaded vi that calls SetActiveWindow function, then use its output windowshandle to find the window name with a lvwuser32.dll function. The problem is this find window name function vi requires a windows reference input, which does not take the window handle output from the SetActiveWindow vi. How do i convert the window handle into a reference number? Thanks again.
04-14-2007 06:16 PM
04-15-2007 12:43 AM
Someone wanted to be smart and used his own window handle type at some point. I would just copy the one from Get Widnwo Handle to the clipboard and replace the ones in the other VI with them. Technically they are the same as they are both a datalog refnum. But syntactically they are different since the typedef of the datalog is different and LabVIEW refuses to connect two different datalog refnums with each other. This is actually the reason to use such refnums for things like OS handles. A LabVIEW user then can't conect unrelated items together.
@BryanL wrote:Hi Rolf, you are exactly right that the two VIs I was trying to connect used different typecasts. So I modified one and made them the same, however, they still cannot connect. I have attached both. Please give them a try. (Both VIs were downloaded from this board with credit goes to the orignal authors)
04-15-2007 03:25 PM