LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Click on button Windows Form Using .Net

Solved!
Go to solution

Hi,

I'm new to LabVIEW and this is my first time, working with the .net functions in labview. What I'm trying to do is to perform a click on a button that is on the Windows form application. 

I was able to load the application and pass data to some fields of the windows form application but I'm struggling trying to perform a click on the windows form using labview. I'm sure the approach i have it's probably not the best and it does need a lot of work, but so far it works the way i want so that's enough for me, any suggestion as how to perform the click please. Thanks a lot.

 

Below is the code i have so far, the control with the index number 6 is the button that i need to perform the click on. 

MyCode2.png

0 Kudos
Message 1 of 2
(1,883 Views)
Solution
Accepted by topic author dreamheart

You can use the .NET UI Automation functions.

 

UI Automation is intended to automate UI interaction for .NET, so exactly what you're looking for. It might not be easy though. You might need to spend a significant amount of time in making a library, because doing this 'ad hoc' will definitely create a mess.

 

EDIT:

UI Spy (obsolete), Inspect.exe (obsolete) or the successor accessibility insights (haven't tried it) use the same techniques. So you can use those to examine the 'automation tree' structure interactively, and than build only the branch you need in LabVIEW.

Message 2 of 2
(1,808 Views)