同意
kevin_gao(困了!累了!睡觉了!)
kevin_gao(困了!累了!睡觉了!)
解决方案 »
- Adoquery执行存储过程无法接收参数
- 几个DELPHI的菜鸟问题!
- 多层开发中,如何区分是逻辑分离和物理分离???
- 谁有系统介绍存储过程,触发器,试图的资料,最好有些实例的!!
- 有数据库资料的朋友请帮忙。我需要一个数据库。
- 请问?谁知道TStringGridEx是那个控件里面的?
- 急,打印如何精确定位?谢!
- 帮忙看一下我的一段自动生成报表的测试程序
- 关于sender的问题
- 怎么安装interbase server
- ado控件的异步执行错误:'A connection component is required for async ExecuteOptions.'为什么设executeoption为异步执行就产生此错?
- 我要疯啦!为什么得不到书上示范的结果???请大侠帮忙看看啊,关于Midas中返回错误记录问题。
昨天刚学到的,ExtractFileDir(Application.ExeName),返回可执行文件所在的目录.
当然,一般情况下用GetCurrentDir()或者Getdir也可以!
再不行就用Savedialog或者Opendialog,再dialog compenents中
就要那种界面的.SelectDirectory与之相差太大了
var
pPrograms,pBrowse: PItemIDList;
hBrowseInfo: TBROWSEINFO;
hPChar: PChar;begin
if (not SUCCEEDED(SHGetSpecialFolderLocation(Getactivewindow, aRoot,
pPrograms))) then
EXIT;
hPChar := StrAlloc(max_path);
with hBrowseInfo do
begin
hwndOwner := Getactivewindow;
pidlRoot := pPrograms;
pszDisplayName := hPChar;
lpszTitle := pChar(aCaption);
ulFlags := BIF_RETURNONLYFSDIRS;
lpfn := nil;
lParam := 0;
end; pBrowse := SHBrowseForFolder(hBrowseInfo);
if (pBrowse <> nil) then
if (SHGetPathFromIDList(pBrowse, hPChar)) then Result:= hPChar;
StrDispose(hPChar);end;
条用:
GetFolder(0,'请选择所需的路径:');
str_dir:string;
showmessage(getdir(0,str_dir));
使用
var s:string;
然后使用selectdirectory('选择文件夹','',s)就能够达到需要的效果