2022年教你在DELPHI中如何调用系统对话框Delphi教程.docx





《2022年教你在DELPHI中如何调用系统对话框Delphi教程.docx》由会员分享,可在线阅读,更多相关《2022年教你在DELPHI中如何调用系统对话框Delphi教程.docx(5页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、2022年教你在DELPHI中如何调用系统对话框Delphi教程 在写程序的时候,有时我们为了省力,或者为了别的目的,我们经常想借用系统的对话框,那么,如何才能调用系统对话框呢?一位挚友是VB中是这样调用“打开方式”对话框的: winexec(PChar(rundll32 shell32,OpenAs_RunDLL +FilePath),SW_SHOWDEFAULT); 这句代码是运行rundll32.exe,让它调用shell32.dll中的资源来实现的。方法可行,但是有很多像我一样的菜鸟并不明白如何调用shell32.dll中的珍贵资源,我们应当如何去做呢? 下面说说我是如何调用的: 一、
2、调用系统“About”对话框: 首先在uses中加入SHellApi, 然后写下如下代码: procedure TForm1.Button1Click(Sender: TObject); var shellapp: variant; begin ShellAboutW(0,Timer v1.03,kedy版权全部,1); end; 其他步骤我不详述。运行后点击button就会弹出标准的WINDOWS关于对话框。对话框标题为关于Timer v 1.03。大家可 以看到,在程序中我运用了ShellAboutW这个函数。在MSDN2022中这个函数 是这样描述的: ShellAbout Functi
3、on Displays a ShellAbout dialog box. Syntax int ShellAbout( HWND hWnd, LPCTSTR szApp, LPCTSTR szOtherStuff, HICON hIcon ); Parameters hWnd in Window handle to a parent window. This parameter can be NULL. szApp in Pointer to a null-terminated string containing text that will be displayed in the title
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022 DELPHI 如何 调用 系统 对话框 教程

限制150内