如何在FileBox中按右鍵點選menu中的刪除選項刪檔 |
尚未結案
|
syene
一般會員 發表:17 回覆:12 積分:5 註冊:2003-01-04 發送簡訊給我 |
|
supman
尊榮會員 發表:29 回覆:770 積分:924 註冊:2002-04-22 發送簡訊給我 |
您好:
我測試很正常,不曉得您遇到什麼問題
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, StdCtrls, FileCtrl; type TForm1 = class(TForm) FileListBox1: TFileListBox; PopupMenu1: TPopupMenu; N25221: TMenuItem; DirectoryListBox1: TDirectoryListBox; procedure N25221Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.N25221Click(Sender: TObject); begin DeleteFile(FileListBox1.FileName); FileListBox1.Update; FileListBox1.Directory:=DirectoryListBox1.Directory; end; end. |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |