LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How access FP.OSWindow property??

Solved!
Go to solution
Hi guys, I inherited a piece of code, and found an interesting VI property that gives me a handle to window. Was it discontinued since LV4, where the code seems to be written, or am I missing something? Neither can I find Window refnum constant... Please advise 🙂
-fomine
_________________________________
You can do greater things with LabVIEW!
Download All
0 Kudos
Message 1 of 14
(5,406 Views)

If you have scripting enabled, Use FP.NativeWindow.

0 Kudos
Message 2 of 14
(5,389 Views)

@Matthew Kelton wrote:

If you have scripting enabled, Use FP.NativeWindow.


You need a little more than scripting enabled to get that private property (at least through LV10).  Smiley Wink

 

The first CLFN in this snippet gets you the HWND from a FP using the Windows API, ignore the second one.

 

Message 3 of 14
(5,384 Views)

Hi fomine, there are several Corrective Action Request related to this property (for reference, CARs #189516 and #45475). Long story short, it was deprecated because in some circumstances made LabVIEW crash and because it was not a safe method for 64bit OS.

 

There is an easier way to manipulate the window properties by using a property node referenced to the VI that you want to handle. Take a look at the picture attach. The reference to the VI can be found in the Functions palette>Application Control>VI Server Reference. All you need to do is changing to write the properties that you desire to manage.

Alejandro C. | National Instruments
Message 4 of 14
(5,343 Views)

Ah, Darin, but the second part is what I am really interested in 🙂

At the end of the day, I need to be able to change window title name, hide/show it, change window size, and change frame width - all using user32.dll

I am trying to look up the call functions, but msdn is not being cooperative friendly to me 😞

If you have call functions for these 4(5) window properties - I'd greatly appresicate it!

 

Thanks a lot,

 

Evgeny

-fomine
_________________________________
You can do greater things with LabVIEW!
0 Kudos
Message 5 of 14
(5,323 Views)

Thanks Alex!

 

Unfortunately, I have to manipulate non-LV window, so I needed to get a winAPI handle. Now this part is solved, just a bit left to figure out 🙂 - my previous post.

-fomine
_________________________________
You can do greater things with LabVIEW!
0 Kudos
Message 6 of 14
(5,313 Views)

I would look here for some tips on utilizing the Windows API

 

https://decibel.ni.com/content/docs/DOC-2030

 

0 Kudos
Message 7 of 14
(5,315 Views)

Those libs don't have title manipulations except for flashing it 😞 - and that functionality is the most important 😞

-fomine
_________________________________
You can do greater things with LabVIEW!
0 Kudos
Message 8 of 14
(5,312 Views)

SetWindowText is what you want for the title bar.

0 Kudos
Message 9 of 14
(5,309 Views)
What you will find in those LLBs are examples of passing the parameters you encounter in the common WindozeAPI functions so that it becomes easy to implement others such as the one Matthew pointed you to.
0 Kudos
Message 10 of 14
(5,303 Views)