只是用来显示错误信息的窗体,有必要做控件吗???
 直接做一个messagebox就不可以了吗??

解决方案 »

  1.   

    function MsgBox(
        hwnd : hwnd;
        lptext : pchar;
        lpcaption : pchar;
        uType :cardinal
    ) : integer;
    begin
        Result := messagebox(hwnd, lptext, lpcaption, uType);
    end;或:function  MyMsgBox(
        handle : hwnd;
    const Prompt : string;
        const Msg : string;
        uDlgType : cardinal = MB_ICONINFORMATION;
        uButType : cardinal = MB_OK;
        uDefVal : cardinal = MB_DEFBUTTON1
    ) : Word;
    begin
    Result := MsgBox(handle,
            pChar(Msg), pChar(Prompt), uDlgType+uButType+
            uDefVal+MB_APPLMODAL);
    end;