09-20-2012 12:04 PM
I'm pretty new to .net connectivity but I have a dll with a class that when constructed (using Constructor Node) runs my windows form.
public class RunForm
{
public RunForm()
{
Application.Run(new Form1());
}
}
The form opens and this works fine until the form calls openfiledialog.showdialog(). The file dialog never opens and this locks up labview. Just to be clear, when I construct this in a windows application, there is no problem. I'm not sure what I'm missing.
Solved! Go to Solution.
09-20-2012 01:10 PM
Not sure what exactly it is you're doing (creating a class library to run a Windows form from LabVIEW seems a little convoluted to me), but usually in cases like this the issue is that the VI is not set to run in the User Interface thread. Open the VI Properties and in the Execution section set the "Preferred Execution System" to "User Interface".
09-20-2012 03:32 PM
Thanks. That was the problem.
If you care, I just wanted to use code I had already written for a windows application and didn't want to redo it in labview.