默认路径为桌面 怎么设定?
解决方案 »
- 路过的看一下:用ADO连接ORACLE为什么表内存储为负的数字,显示出来确成了正的
- 关于处理ID:lovend在论坛重复回复无效回复的通报!
- 大伙试过吗:ADOQuery能实现DBGrid中的下拉吗?
- 为什么我关闭INDY 的TIDSERVER出现Terminate Thread Timeout
- 恭祝Delphi园地网站升级为支持200人同时在线,每月积分前三名,升级白银会员,赠送商业源码一套!
- delphi有注释工具吗
- 寻找可以把简体字变成繁体字的软件
- DBEdit:Query 如何实现数据更新
- 这会儿,有能上大富翁的吗?
- 这样的报表怎样做
- DBGrid 和 ADOQuery 结合出错,DBGrid显示不出
- AQOQuery动态查询和静态查询的问题?
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, ADODB, Grids, DBGrids,shlobj;type
TForm1 = class(TForm)
OpenDialog1: TOpenDialog;
Label1: TLabel;
Button1: TButton;
ListBox1: TListBox;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var
pidl: PItemIDList;
FavPath: array[0..MAX_PATH] of char;
temp:array [1..17] of integer; i:byte;
begintemp[1]:=CSIDL_DESKTOP; //桌面
temp[2]:=CSIDL_DESKTOPDIRECTORY ; //桌面目录
temp[3]:=CSIDL_FONTS ; //字体目录
temp[4]:=CSIDL_NETHOOD ; //网络邻居
temp[5]:=CSIDL_PERSONAL ; //我的文档目录
temp[6]:=CSIDL_PROGRAMS ; //开始菜单程序目录
temp[7]:=CSIDL_RECENT ; //存放用户最近访问文件快捷方式的目录
temp[8]:=CSIDL_SENDTO ; //"发送到"目录
temp[9]:=CSIDL_STARTMENU ; //开始菜单目录
temp[10]:=CSIDL_STARTUP ; //开始菜单启动项目录
temp[11]:=CSIDL_FAVORITES ; //收藏夹目录
for i:=1 to 17 do
begin
SHGetSpecialFolderLocation(Handle, temp[i], pidl);
SHGetPathFromIDList(pidl, favpath);
listbox1.Items.Add(StrPas(FavPath));
end;
end;
{var
filename:string;begin
if OpenDialog1.Execute then
begin
OpenDialog1.FileName :=
end;
end;
}end.
你直接设置个默认的路径就可以了
例如:d:\game