"Unit1.cpp" Dosyası
#include <vcl\vcl.h>
#pragma hdrstop
#include "Unit1.h"
#pragma resource "*.dfm"
TForm1 *Form1;
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner):TForm(Owner)
{
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
void __fastcall TForm1::WMNCHitTest(TMessage &Msg)
{
TForm::Dispatch(&Msg);
if (Msg.Result == HTCLIENT)
Msg.Result = HTCAPTION;
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Application->Terminate();
}
//---------------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
"Unit1.h" Dosyası
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\ExtCtrls.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TButton *Button1;
void __fastcall Button1Click(TObject *Sender);
private: // User declarations
void __fastcall WMNCHitTest(TMessage &Msg);
public: // User declarations
__fastcall TForm1(TComponent* Owner);
BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(WM_NCHITTEST, TMessage, WMNCHitTest)
END_MESSAGE_MAP(TForm)
};
//---------------------------------------------------------------------------
extern TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
PROGRAMIN EKRAN GÖRÜNTÜSÜ
<<< Geri Dön