11-05-2012 08:11 AM
Hello All.
I want to launch calc.exe so that it opens over my area defined as shown in the figure "ScreenShot Launch External Exe.bmp". Please find the attached code having figure too. Is it possible ? and if its not how can i change calc.exe coordinates(position) so that it just lies over my desired area.
Thanks & Regards.
Moshi.
11-06-2012 07:56 PM
Hi Moshi,
Thanks for posting on the NI Discussion Forums.
Unfortunately, there is not a way to specify the position of executables launched with the LaunchExecutableEx function. However, it is possible to manipulate the positions of windows on your system by calling into the Windows API. Please reference the following KnowledgeBase article for further information on how to do this:
http://digital.ni.com/public.nsf/allkb/4D03093F2079ABDD86256969006E9ECC
I believe the Windows function you need to call is SetWindowPos(). You'll need to obtain a reference to the Calc application, then use this reference as a parameter to the SetWindowPos() function to change its position.
I hope this helps.