외부 프로그램 실행시키기
Microsoft Dynamics AX
2011. 6. 9. 10:43
WinApi::shellExecute를 사용하여 외부 프로그램을 실행할 수 있습니다. 아래 샘플코드는 인터넷 익스플로러를 실행시키면서 시작페이지로 네이버를 지정한 예입니다.
static void shellExecute(Args _args)
{
#WinAPI
WinApi::shellExecute("C:\\Program Files\\Internet Explorer\\iexplore.exe",
"http://www.naver.com"); // 실행파일의 경로를 정확히 알고 있는 경우
WinApi::shellExecute(strfmt("%1\\Internet Explorer\\iexplore.exe",
WinApi::getFolderPath(#CSIDL_PROGRAM_FILES)),
"http://www.naver.com");
}
{
#WinAPI
WinApi::shellExecute("C:\\Program Files\\Internet Explorer\\iexplore.exe",
"http://www.naver.com"); // 실행파일의 경로를 정확히 알고 있는 경우
WinApi::shellExecute(strfmt("%1\\Internet Explorer\\iexplore.exe",
WinApi::getFolderPath(#CSIDL_PROGRAM_FILES)),
"http://www.naver.com");
}
'Microsoft Dynamics AX' 카테고리의 다른 글
Microsoft Dynamics AX 2012 Official Manual (10) | 2013.03.07 |
---|---|
KPIs 나 Business Overview 가 표시(로딩)되지 않을 때 (0) | 2011.10.19 |
문자열에서 숫자만 남기기 (0) | 2011.06.03 |