delphi编辑hosts文件
来源:互联网 发布:淘宝店怎么开通淘金币 编辑:程序博客网 时间:2024/05/17 01:23
unit Unit2;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;type TForm2 = class(TForm) Memo1: TMemo; procedure FormCreate(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); private { Private declarations } public { Public declarations } end;var Form2: TForm2;implementation{$R *.dfm}procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);beginmemo1.Lines.SaveToFile('C:\Windows\System32\drivers\etc\hosts');end;procedure TForm2.FormCreate(Sender: TObject);beginmemo1.Clear;if FileExists('C:\Windows\System32\drivers\etc\hosts') then begin memo1.Lines.LoadFromFile('C:\Windows\System32\drivers\etc\hosts');end Else begin memo1.Lines.Add('C:\Windows\System32\drivers\etc\hosts,不存在!!!')end;end;end.
0 0
- delphi编辑hosts文件
- Mac系统如何编辑hosts文件
- Mac系统如何编辑hosts文件
- Linux 如何编辑/etc/hosts文件
- macOS -- Mac系统如何编辑hosts文件
- Win10修改编辑hosts文件无法保存怎么办
- Win10修改编辑hosts文件无法保存怎么办
- Win10修改编辑hosts文件无法保存怎么办
- shel脚本编辑hosts文件(awk、sed、ed)
- Mac编辑hosts配置文件
- 在Delphi中编辑res文件
- 在Delphi中编辑res文件
- Hosts文件
- Hosts文件
- hosts文件
- Hosts文件
- Hosts文件
- hosts 文件
- ccf测试基础训练
- Jquery获取元素标签名称
- Timus 2046 The First Day at School 非常好的一道模拟题
- android SlidingTabLayout实现ViewPager页卡滑动效果
- 123
- delphi编辑hosts文件
- Python项目开发实战——互动出版网
- 软件工程判断三角形
- 基础篇:数据挖掘的聚类算法和优势
- 欢迎使用Markdown编辑器写博客
- Android里 listview 添加 HeaderView
- iOS网络开发之NSURLSession学习<1>
- delphi修改服务器3389端口
- 模拟表单上传文件 PSOT请求