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
[7458] filelistbox에 대한 질문입니다.
델초짜 [] 1107 읽음    2001-09-26 03:32
Filelistbox에 특정디렉토리의 화일들을 보여주고, 그 화일리스트를 하나의 스트링으로 만들어서 데이타를 보내주는 예제입니다. 그런데 화일리스트를 이용하지 않고, 이 기능을 구현하고 싶은데요.. 파일리스트의 속성? 을 상속해서 사용하면 될것같은데.
상속을 어떻게 하는지 잘모르겠습니다.
아래예제를 보시고 방법좀 가르쳐주시면 고맙겠습니다. 그럼 즐~~프하세요..
procedure FileListSend(fname:string);
var
F: File;
i: Integer;
stream:string;
totstream:string;
SourceHand:INTEGER;
begin
filelistBox1.Directory:=extractfilepath(fname);
for i := 0 to (FileListBox1.Items.Count - 1) do begin
try
     if not FileExists(FileListBox1.Items.Strings[i]) then begin
       MessageDlg('File: ' + FileListBox1.Items.Strings[i] +
                  ' not found', mtError, [mbOk], 0);
       Continue;
     end;
   AssignFile(F, FileListBox1.Items.Strings[i]);
   Downloadfile:=fileOpen(fileListBox1.Directory+'\'+chatform.FileListBox1.Items.Strings[i],fmOpenread  or fmShareDenyNone);
     if Downloadfile=-1 then exit;
         FileSeek(Downloadfile,0,0);
     FileListBox1.Directory+'\'+FileListBox1.Items.Strings[i]));
     stream:='#'+ filelistbox1.Items.Strings[i]+ '#',
     if i = filelistbox1.items.count - 1 then begin
           totstream:=totstream+stream+'#';
     end
     else
           totstream:=totstream+stream;
  finally
  { do something here }
CloseFile(F);
  end;

end;
  totstream:=copy(totstream,2,length(totstream));
   SendData(chatform.ServerSocket.Socket.Connections[0], totstream,mtDIRECTORY);
end;

+ -

관련 글 리스트
7458 filelistbox에 대한 질문입니다. 델초짜 1107 2001/09/26
7459     Re:filelistbox에 대한 질문입니다. 류종택 935 2001/09/26
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.