WinExec는 두개의 매게변수만이 필요합니다.. 세개가 아니죠...
function WinExec(CmdLine: PChar; CmdShow: Word): Word;
위의형식 이며.....
CmdLine 부분에는 실행을 시켜줄것과 파라미터를 적어주시면 되고....
예) notepad readme.txt
위의 예를 넣으면 (물론 '' 로 묶으셔야죠)notepad가 열리면서 뒤의 readme.txt를
열게 됩니다.
CmdShow부분은....
CmdShow Specifies how the window is to be shown. This parameter can be one of the following values:
Value Meaning
SW_HIDE Hides the window and passes activation to another window.
SW_MINIMIZE Minimizes the specified window and activates the top-level window in the system's list.
SW_RESTORE Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position (same as SW_SHOWNORMAL).
SW_SHOW Activates a window and displays it in its current size and position.
SW_SHOWMAXIMIZED Activates a window and displays it as a maximized window.
SW_SHOWMINIMIZED Activates a window and displays it as an icon.
SW_SHOWMINNOACTIVE Displays a window as an icon. The window that is currently active remains active.
SW_SHOWNA Displays a window in its current state. The window that is currently active remains active.
SW_SHOWNOACTIVATE Displays a window in its most recent size and position. The window that is currently active remains active.
SW_SHOWNORMAL Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position (same as SW_RESTORE).
입니다.. 보기가 조금 어렵군요....
보통 SW_SHOWNORMAL 을 많이 사용합니다.
예) WinExec('notepad.exe readme.txt',SW_SHOWNORMAL);
위처럼 하면 되는것이죠...
음.. 위부분이 영어라서..(도움밀의 일부입니다.)
도움이 되셨기를....
|