LAVA: Launch a floating Windows Form - LAVA

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Launch a floating Windows Form Rate Topic: -----

#1 User is offline   GoGators 

  • Very Active
  • Group: NI
  • Posts: 53
  • Joined: 11-August 09
  • Location:Austin, TX
  • Version:LabVIEW 8.6
  • Since:2006

Posted 01 February 2010 - 05:20 PM

Hi,

So LabVIEW currently doesn't support WPF. But I have figured out a way to put a WPF on a .NET Form (sometimes referred to as a WinForm). Now I need to be able to launch the Form from labVIEW so that I can interact with it. It is the equivalent of launching a VI at runtime (using VI Server) and having two independent VIs running separately.

Anyone got any ideas? I think my main problem is that when I try to launch the Form with the Show method, it wants me to assign an owner application of the form. Thanks all.
I love it when a plan comes together.
0

#2 User is online   François Normandin 

  • The 500 club
  • Group: Moderators
  • Posts: 836
  • Joined: 18-January 08
  • Location:Montréal, QC
  • Version:LabVIEW 2009
  • Since:1999

Posted 01 February 2010 - 05:26 PM

View PostGoGators, on 01 February 2010 - 12:20 PM, said:

Hi,

So LabVIEW currently doesn't support WPF. But I have figured out a way to put a WPF on a .NET Form (sometimes referred to as a WinForm). Now I need to be able to launch the Form from labVIEW so that I can interact with it. It is the equivalent of launching a VI at runtime (using VI Server) and having two independent VIs running separately.

Anyone got any ideas? I think my main problem is that when I try to launch the Form with the Show method, it wants me to assign an owner application of the form. Thanks all.


The owner "IWin32Window" is most probably the Window Handle of your calling VI. That would be my first guess...
François [frɑ̃swa]
0

#3 User is offline   GoGators 

  • Very Active
  • Group: NI
  • Posts: 53
  • Joined: 11-August 09
  • Location:Austin, TX
  • Version:LabVIEW 8.6
  • Since:2006

Posted 02 February 2010 - 03:10 PM

Turns out the issue is you can call a windows form through the Show method, but it has to be in a single threaded apartment (STA). In other words the VIs execution system should be set to the User Interface to make it single threaded.
I love it when a plan comes together.
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic