Jump to content


  • Posts

  • Joined

  • Last visited

LabVIEW Information

  • Version
    LabVIEW 2012
  • Since

Recent Profile Visitors

482 profile views

dcribeiro's Achievements


Newbie (1/14)



  1. Thanks for pointing me in the right direction. It was indeed a thread problem. Since LabVIEW by default uses a multi-thread system (MTA) and Windows Forms need a single-thread system (STA). After some time trying to force, inside the VB code, the thread be an STA. I found a much simpler solutions in this topic: http://forums.ni.com/t5/Measurement-Studio-for-NET/Calling-net-dll-in-Labview/td-p/803084 In the 1st response by the user nickb. So by changing the way LabVIEW calls the .NET application in the LabVIEW VI execution properties (change it to "user interface"), my application can now run without any errors. Thanks to everyone.
  2. Yes, I am trying to call an instance of a Form (the main menu of the application), using the method Show(). The Form is not created before the invoke of the method and I want it to show up, so that I can use through LV. It indeed shows up (not completely, the menu with the drag and drop capabilities enabled does not show), if I press continue in the mentioned error. I have tried this approach with success for a different application that does not have any drag and drop menus. Here are some more details about the error: ************** Exception Text ************** System.InvalidOperationException: DragDrop registration did not succeed. ---> System.Threading.ThreadStateException: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. at System.Windows.Forms.Control.SetAcceptDrops(Boolean accept) This error does not show up when I start the application through the SO windows menu directly (as a standalone application). Any ideas on the cause of the problem? Thanks for all the help. Diogo Ribeiro
  3. Hi all. I am trying to call a VB .NET application develloped in my company. The Construtor node returns no errors. However when I use the Invoke Node to call the Show() method, the following error appear: "DragDrop registration did not succeed" The application I am trying to call uses drag and drop menus. But, shouldn't LabVIEW be able to let those run? Is there a work arround for this? I am using LabVIEW 2014 32-bits and .NET framework 4.5. Thanks in advance for all the help. Regards, Diogo Ribeiro
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.