1)Load的时候,不要指定路径
2)调用格式有问题fun的定义不对:
int ShellAbout (    HWND hWnd, // handle of parent window
    LPCTSTR szApp, // title bar and first line text
    LPCTSTR szOtherStuff, // other dialog text
    HICON hIcon  // icon to display
   );

解决方案 »

  1.   

    直接用ShellAbout(handle,'ABC#DEF','TEST',Icon.Handle)就算了。干吗那么麻烦?
      

  2.   

    procedure TForm1.Button1Click(Sender: TObject);
    var fun:function(hwnd:hwnd;str1,str2:pchar;hicon:hicon):dword;
        hand1:thandle;
    begin
      hand1:=loadlibrary('c:\winnt\system32\shell32.dll');
      if hand1<>0 then
         @fun:=getprocaddress(hand1,'ShellAboutA')
         else showmessage('hand=0');
      if @fun<>nil then fun(0,'abc','xyz',0)
         else showmessage('fun=nil');
    end;
    现在程序改成如上形式,运行结果是可以显示出对话框来。但是当按了对话框中的确定按钮或结束这个程序时,会有出错提示!“Access violation at address 004357DF in module 'Project2.exe'.Read of address 00000026.”,以上程序应该怎么改?
      

  3.   

    Kingron(对CSDN愤怒中……) 的方法比较简单且正确,但别忘了加:
    uses ShellApi;
      

  4.   

    你想要什么樣的對話框﹐我知道的有﹕
    ShellAbout:顯示一個標准的幫助框
    MessageBox:顯示一個系統提示框﹗
    shCreatefolder:顯示一個創建目錄的窗體。
    SHGetSpecialFolderLocation等等很多都是。
    給你推荐一個好的Search網站﹕http://www.google.com,
    你將發現更多﹗﹗﹗﹗﹗