为啥
application.MessageBox('出现错误',gMsgCaption,MB_ICONERROR+MB_OK);
编译不过去,题示:[Error] ygsz.pas(236): Undeclared identifier: 'gMsgCaption'

解决方案 »

  1.   

    application.MessageBox('出现错误','提示',MB_ICONERROR+MB_OK);
    看看application.messagebox的帮助
      

  2.   

    function MessageBox(const Text, Caption: PChar; Flags: Longint = MB_OK): Integer;DescriptionUse MessageBox to display a generic dialog box a message and one or more buttons. Caption is the caption of the dialog box and is optional.MessageBox is an encapsulation of the Windows API MessageBox function. TApplication抯 encapsulation of MessageBox automatically supplies the missing window handle parameter needed for the Windows API function.The value of the Text parameter is the message, which can be longer than 255 characters if necessary. Long messages are automatically wrapped in the message box. The value of the Caption parameter is the caption that appears in the title bar of the dialog box. Captions can be longer than 255 characters, but don't wrap. A long caption results in a wide message box.The Flags parameter specifies what buttons appear on the message box and the behavior (possible return values). The following table lists the possible values. These values can be combined to obtain the desired effect.
      

  3.   

    gMsgCaption 未定义吧?还有应该是PChar('出现错误')吧?