社区
Delphi
帖子详情
当选择*.HTML过滤,则FILELISTBOX(WIN31)中出现两个同名文件
polaris
2000-03-14 02:42:00
为什么我在FILTER控件(WIN31)中设了*.*与*.HTML两个过滤值后,每当选择HTML过滤,则FILELISTBOX(WIN31)中出现两个同名文件,对其中任何一个文件操作如改名编辑都同样有效,不知为什么会有这种怪现象?
...全文
105
4
打赏
收藏
当选择*.HTML过滤,则FILELISTBOX(WIN31)中出现两个同名文件
为什么我在FILTER控件(WIN31)中设了*.*与*.HTML两个过滤值后,每当选择HTML过滤,则FILELISTBOX(WIN31)中出现两个同名文件,对其中任何一个文件操作如改名编辑都同样有效,不知为什么会有这种怪现象?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
kxy
2000-03-15
打赏
举报
回复
不是有source吗,看看,或者跟踪一下,
verve
2000-03-14
打赏
举报
回复
我当时一个用*.*,另一个用*.Html and *.Htm,
但FileListBox显示两个文件,
其实只有一个,比如是ABC.Html
WHY?
csdn2000
2000-03-14
打赏
举报
回复
WIN31只支持8.3格式的文件名,不支持长文件名。 *.HTML的扩展名为四位,属长文件名。
Lin
2000-03-14
打赏
举报
回复
??
是不是扩展名不一样啊?一个为*.html,而另一个为*.htm?这两类文件Windows都显示成Microsoft HTML Document。
vb.net drive
listbox
dir
listbox
file
listbox
控件使用
vb.net drive
listbox
dir
listbox
file
listbox
控件使用
Delphi 获取指定
文件
夹目录.rar
Delphi 获取指定
文件
夹目录,可以设置掩码,可以提取到
文件
目录。源代码情况如下: memo1.Clear; try s:=
File
ListBox
1.Directory; for i:=0 to
File
ListBox
1.Count-1 do begin memo1.Lines.Append(
File
ListBox
1.Items.Strings[i]); end; Application.MessageBox('提取成功!','提示',0); except Application.MessageBox('提取失败!','提示',0); end;
Delphi清理
Win
dows指定
文件
.rar
Delphi清理指定的
Win
dows
文件
,是一个工程建筑材料清理程序,可清理指定格式的
文件
,类似于清理垃圾
文件
。下面是主要的代码逻辑实现方法: if Application.MessageBox('确实要删除当前
文件
吗?','提示',mb_YesNo) = ID_Yes then begin if
File
ListBox
1.Items.Count>0 then begin With
file
Struct do begin Wnd := 0; wFunc := FO_DELETE; pFrom := Pchar(Trim(
File
ListBox
1.
File
Name)); fFlags := FOF_ALLOWUNDO; pTo := Nil; end; if SH
File
Operation(
file
Struct) = 0 then begin ShowMessage('删除成功。'); end else ShowMessage('删除失败。'); end; end;
Delphi浏览并修改
文件
属性.rar
Delphi浏览并修改
文件
属性,可浏览到需要修改属性的
文件
夹,选
中
文件
,可修改
文件
的只读、隐藏、存档、系统等属性,和
Win
dows系统
中
修改
文件
属性的功能是一样的。一些具体的属性修改代码: procedure TForm1.
File
ListBox
1Change(Sender: TObject); var attr:integer; begin attr:=0; if
File
ListBox
1.
File
Name = '' then begin cbxReadOnly.Checked:=False; cbxSys
File
.Checked:=False; cbxHidden.Checked:=False; cbxArchive.Checked:=False; exit; end; attr:=
File
GetAttr(
File
ListBox
1.
File
Name); if attr and faReadOnly = faReadOnly then //只读 CBXReadOnly.Checked:=true else cbxReadOnly.Checked:=False; if attr and faSys
File
= faSys
File
then //系统 CBXSys
File
.Checked:=true else cbxSys
File
.Checked:=False; if attr and faHidden = faHidden then //隐藏 CBXHidden.Checked:=true else cbxHidden.Checked:=False; if attr and faArchive = faArchive then //存档 CBXArchive.Checked:=true else cbxArchive.Checked:=False; end; 完整源代码请下载。
学生上课传输
文件
系统程序
unit Unit1; interface uses
Win
dows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
File
Ctrl, IdBaseComponent, ShellApi,IdComponent, IdIPWatch, ExtCtrls, jpeg; type TForm1 = class(TForm)
File
ListBox
1: T
File
ListBox
; Button1: TButton; Directory
ListBox
1: TDirectory
ListBox
; DriveComboBox1: TDriveComboBox; FilterComboBox1: TFilterComboBox; Edit1: TEdit; Label1: TLabel; Button2: TButton; Label2: TLabel; Memo1: TMemo; Label3: TLabel; IdIPWatch1: TIdIPWatch; Label4: TLabel; Button3: TButton; Edit2: TEdit; Label5: TLabel; Label6: TLabel; Label7: TLabel; procedure Button1Click(Sender: TObject); procedure FormCreate(Sender: TObject); procedure
File
ListBox
1DblClick(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Label3Click(Sender: TObject); procedure Label4Click(Sender: TObject); procedure Button3Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; a1:integer; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var str5: string; begin begin str5 := InputBox('输入姓名', 'Name:', ''); // Application.Terminate; // 退出程序 if str5 ='' then showmessage('没有输入姓名,请重新输入') else begin ShowMessage(str5); //显示输入的内容 Copy
File
(pchar(string(
File
ListBox
1.
File
Name)), pchar('\\10.10.3.167\stu\' + str5+copy(IdIPWatch1.LocalIP,9,3)+Edit1.text), false); Application.MessageBox('已经复制到老师机子里了', '提示', MB_OK) // Application.Terminate; // 退出程序 end ; end; end; procedure TForm1.FormCreate(Sender: TObject); begin self.
File
ListBox
1.
File
Edit :=self.Edit1 ; self.FilterComboBox1.
File
List :=self.
File
ListBox
1 ; self.Directory
ListBox
1.
File
List :=self.
File
ListBox
1 ; self.Directory
ListBox
1.DirLabel :=self.Label1 ; self.DriveComboBox1.DirList :=self.Directory
ListBox
1 ; self.Button1.Default :=true; self.Button3.Visible :=false; end; procedure TForm1.
File
ListBox
1DblClick(Sender: TObject); begin // Copy
File
(
File
ListBox
1.
File
Name,
File
ListBox
1.
File
Name,False); //Copy
File
(pchar(string(
File
ListBox
1.
File
Name)), pchar('\\10.10.3.167\stu\' +copy(IdIPWatch1.LocalIP,9,3)+ Edit1.text), false); //Application.MessageBox('已经复制到老师机子里了', '提示', MB_OK) ShellExecute(handle,'open', pchar(string(
File
ListBox
1.
File
Name)), nil, nil, SW_SHOWNORMAL); end; procedure TForm1.Button2Click(Sender: TObject); begin Application.Terminate; // 退出程序 end; procedure TForm1.Label3Click(Sender: TObject); begin memo1.Lines.LoadFrom
File
(getcurrentdir+'\a.txt'); end; procedure TForm1.Label4Click(Sender: TObject); begin memo1.Lines.LoadFrom
File
(getcurrentdir+'\a1.txt'); end; procedure TForm1.Button3Click(Sender: TObject); var str6: string; begin begin str6 := InputBox('输入窗口标题', '输入提示', '默认输入内容'); ShowMessage(str6); //显示输入的内容 memo1.Lines.SaveTo
File
('\\10.10.3.167\stu\' + copy(IdIPWatch1.LocalIP,9,3)+str6+'.txt'); Application.MessageBox('你的作业已经复制到老师机子里了', '提示', MB_OK) end; end; end.
Delphi
5,388
社区成员
262,729
社区内容
发帖
与我相关
我的任务
Delphi
Delphi 开发及应用
复制链接
扫一扫
分享
社区描述
Delphi 开发及应用
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章