AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
DAX
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 13.08.2010, 21:06   #1  
Blog bot is offline
Blog bot
Участник
 
25,497 / 847 (79) +++++++
Регистрация: 28.10.2006
sumitax: Calling external applications from User control in EP
Источник: http://sumitax.wordpress.com/2010/07...control-in-ep/
==============

During EP development , sometimes we need to call third party or external applications. If you need more control over this third party call, for example you want to make sure that the application starts in an invisible mode or the process needs to be killed after a certain time. This way you can hide  the window in case a success message ( 1 file successfully exported) is returned. You can do the same with using WinAPI::shellExecute from X++ and call this code from Visual Studio , but you will not find it as flexible as calling a process from Visual Studio to invoke the external application.

Following is the code to call an external application :

System.Diagnostics.Process  my process = new System.Diagnostics.Process();

myProcess.StartInfo.Filename = "gswin32.exe";

myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden ;

myProcess.StartInfo.CreateNoWindow = True

myProcess.Start();

//Kill the process if it doesn’t finish in one minute.

myProcess.WaitForExit(1000) ;

If(!myProcess.HasExited )

{
myProcess.Kill;

 

}




Источник: http://sumitax.wordpress.com/2010/07...control-in-ep/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
DAX2009 EP: Работа с меню QuickLaunch из User Control'а LEXAR DAX: Программирование 1 02.06.2010 09:24
Solutions Monkey: 64bit machine - VS EP add-in not deploying user control to SharePoint while saving Blog bot DAX Blogs 0 06.01.2010 08:19
Solutions Monkey: Redirecting in EP user control to download a file Blog bot DAX Blogs 0 11.09.2009 15:05
Khue Trinh: AX 2009 Quality Management - Quality Control Blog bot DAX Blogs 1 04.07.2008 16:01
epblog: How to update Data Set from User Control? Blog bot DAX Blogs 0 21.06.2008 13:05

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 18:55.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.