Trang Chủ | Diễn Đàn | Thành Viên (Đăng Ký) | Tìm Kiếm | Tutorial Room
Delphi - Hỏi về cách browse, select đường dẫn trog Delphi
Hỏi đáp, trao đổi về lập trình Delphi.
Chú ý: Pascal/Delphi FAQs
First page Previous page  (Page 1 )   1   Next page Last page
Hỏi về cách browse, select đường dẫn trog Delphi
Member
Member since
22:40 20-03-2009
Posts: 37
Fantasy Points: 128
Rank
smile Posted at 00:26 10-08-2009 Move Move Topic   Pin/Unpin Pin Topic   Lock Lock Topic
Các bác chỉ tui cách làm thế nào mà nhấn vào nút trên form thì 1 cửa sổ mới hiện lên cho phép ta chọn file/chọn đường dẫn? Ở đây dùng kiểu dữ liệu gì?
||
Reply Reply   Quote Quote   Edit Edit   Delete Delete   Report Report
This post has been viewed 1,209 time(s). 1 direct repli(es) and 0 indirect repli(es).
Title Poster
smile Hỏi về cách browse, select đường dẫn trog Delphi
 
answer Re: Hỏi về cách browse, select đường dẫn trog Delphi
traixubac
Re: Hỏi về cách browse, select đường dẫn trog Delphi
Member
Member since
03:14 25-03-2010
Posts: 6
Fantasy Points: 22
Rank
answer Posted at 09:57 27-03-2010
Reply to Hỏi về cách browse, select đường dẫn trog Delphi (ntan)
Mình có phần code đầu để đọc file dữ liệu này.Mọi người tham khảo xem.Cái này còn phải tuỳ định dạng file dữ liệu mình cần đọc thì phần mã sau sẽ khác nhau.
procedure TGiao_dien_chinh.Docfilesolieu1Click(Sender: TObject);
var
st:array[0..25]of string[12];
i,j:integer;
Function GetCurrentDirectory:string;
Var
nBufferLength: DWORD;
lpBuffer : PChar;
begin
nBufferLength:=MAX_PATH +1;
GetMem(lpBuffer,nBufferLength);
try
if Windows.GetcurrentDirectory(nBufferLength,lpBUffer)>0 then
Result:=lpBuffer;
finally
FreeMem(lpBuffer);
end;
end;
begin
Opendialog1.Title:='Mo file so lieu';
Opendialog1.InitialDir:=GetCurrentDirectory;
if opendialog1.execute then
try
Assignfile(f,Opendialog1.FileName);
ten1:=extractfilename(Opendialog1.FileName);
reset(f);
.............................
Reply Reply   Quote Quote   Edit Edit   Delete Delete   Report Report
This post has been viewed 506 time(s). 0 direct repli(es) and 0 indirect repli(es).
First page Previous page  (Page 1 )   1   Next page Last page

Permissions: Create Topic: No  |  Reply Topic: No  |  Attach File: No  |  Make Poll: No

Vietnamese Keyboard: AUTO TELEX VNI VIQR VIQR* OFF

Go top || Print page ||

All logos, trademarks and graphics artwork in this site are property of their respective owners.
Opinions expressed in articles within this site are those of their owners and may not reflect the opinion of TXBB.

TXBB: Home - Disclaimer - Help - Contact
Copyright (C) 2000-2006 TXBB. All rights reserved.

TreXanh Bulletin Board v2.0 (Build: #332 Nov 21, 2006)

DEBUG INFORMATION
Execution 0.153s - SQL used 3s - Concurrent process(es) 0