Unit1.h

//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include
#include
#include
#include
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
        BEGIN_MESSAGE_MAP
        MESSAGE_HANDLER(WM_SYSCOMMAND,TMessage,OnWMSysCommand)
        END_MESSAGE_MAP(TForm)
__published: // IDE-managed Components

private: // User declarations

public:  // User declarations

    __fastcall TForm1(TComponent* Owner);

    void __fastcall OnWMSysCommand(TMessage& Message);


};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------

#endif

Unit1.cpp
void __fastcall TForm1::OnWMSysCommand(TMessage& Message)
{
if(Message.WParam==SC_MINIMIZE)
    {
    //MessageBox(NULL,"最小化","最小化",MB_OK|MB_ICONINFORMATION);
    Form1->Hide();
    return;
    }

TForm::Dispatch(&Message);

}

相关文章:

  • 2022-02-03
  • 2021-12-18
  • 2022-01-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-11
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
相关资源
相似解决方案