Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[85] >질문< 아래 순차적 실행 잘 안됨!
klaist [ ] 2920 읽음    1997-11-04 12:28
저기 아래 답변이 winexec함수를 사용 했더군요.. 전 shellexecute함수 쓰거든요..

파라미터까지 실행시키기 위해...

제가 지금 통합연주기 만드걸랑요.... 히

그냥 제가 부분 소스 보여 드릴테니 수정을..

procedure TForm1.Button4Click(Sender: TObject);
label here;
var
dir1, dir2, dir3 : array[0..75] of char;
a, b, pdir : string;
i : integer;
k : THandle;
begin
getdir(0, pdir);
i:=0;
here:
  label2.caption:=inttostr(i);

for i:=i to listbox1.items.count-1 do
begin
a:=listbox1.items.strings[i];
b:=copy(a, pos('.', a)+1, length(a)-pos('.', a));

{var
   InstanceID : THandle;

begin
   InstanceID := WinExec(파일이름,1);
   repeat
      Application.ProcessMessages;
   until Application.Terminated or (GetModuleUsage(InstanceID) = 0);
end;}

if (b='ra') or (b='rm') or (b='RA') or (b='RM') then
    {begin}
    k:=shellexecute(handle, nil, strpcopy(dir1, 'rvplayer.exe'),
       strpcopy(dir2, listbox2.items.strings[i]),
       strpcopy(dir3, pdir), sw_show);
      repeat
       Application.ProcessMessages;
      until Application.Terminated or (GetModuleUsage(k) = 0);

    {i:=i+1;
    goto here;}
    {end;}

if (b='mp3') or (b='MP3') then
    {begin}
    k:=shellexecute(handle, nil, strpcopy(dir1, 'winplay3.exe'),
       strpcopy(dir2, listbox2.items.strings[i]),
       strpcopy(dir3, pdir), sw_show);
      repeat
       Application.ProcessMessages;
      until Application.Terminated or (GetModuleUsage(k) = 0);

    {i:=i+1;
    goto here;}
    {end;}

if (b='wav') or (b='WAV') then
    {begin}
    mediaplayer1.filename:=listbox2.items.strings[i];
    mediaplayer1.open;
    mediaplayer1.play;
      repeat
       Application.ProcessMessages;
      until Application.Terminated or (GetModuleUsage(k) = 0);

    {i:=i+1;
    goto here;}
    {end;}
  end;
end;

지저분 하죠 히~~~



+ -

관련 글 리스트
85 >질문< 아래 순차적 실행 잘 안됨! klaist 2920 1997/11/04
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.