-->

Thursday, April 1, 2010

Closing GP Using Visual Studio Tools (... and on getting married)

Development is all about re-using code. Found this good piece of code contributed by Mohammad R. Daoud in the forums.

This would allow the Visual Studio Tools to close Dynamics GP

Dim myProcesses As Process() = Process.GetProcessesByName("Dynamics")
Dim myProcess As Process
For Each myProcess In myProcesses
myProcess.CloseMainWindow()
myProcess.WaitForExit()
Next myProcess

If you have more than one instance of Dynamics running, this would probably not work,
and Daoud has put in code for that too.

See discussion at http://www.eggheadcafe.com/software/aspnet/33405791/re-close-gp10-from-vst-a.aspx
Which forum is this post from ? Can either of you experts out there point me to the original forum ?
Oh, and yes this is my first post as a married man :) 
Some Pictures here : 
http://www.facebook.com/album.php?aid=50710&id=1324796450&l=8a767c9ea6
My sister has been writing about my marriage here(it is the best gift I have ever received from her,
will last the ages, lucky to have her!) - 
http://www.manjotkaur.com/2010/02/on-best-wedding-ever.html
http://www.manjotkaur.com/2010/02/best-wedding-ever-ii.html
http://www.manjotkaur.com/2010/03/best-wedding-iii.html
http://www.manjotkaur.com/2010/03/jivis-wedding-iv.html
Below is the back cover of the card we made, Rubal's favorite color :)
 

No comments: