Formulário TEXTO:
objeto Form1: TForm1
Esquerda = 192
Superior = 107
BorderStyle = bsNone
Legenda = 'Formulário1'
Altura do Cliente = 348
Largura do Cliente = 536
Cor = clBtnFace
Fonte.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Fonte.Altura = -11
Font.Name = 'MS Sans Serif'
Fonte.Estilo = []
OldCreateOrder = Falso
OnCreate = Button1Click
PixelsPorPolegada = 96
Altura do Texto = 13
objeto Button1: TButton
Esquerda = 392
Superior = 152
Largura = 75
Altura = 25
Legenda = 'Botão1'
OrdemDaTab = 0
OnClick = Button1Click
fim
objeto Button2: TButton
Esquerda = 432
Superior = 24
Largura = 17
Altura = 17
Legenda = 'Botão2'
OrdemDaTab = 1
OnClick = Button2Click
fim
objeto Button3: TButton
Esquerda = 448
Superior = 40
Largura = 17
Altura = 17
Legenda = 'Botão2'
Ordem da Tabulação = 2
OnClick = Button3Click
fim
objeto Button4: TButton
Esquerda = 464
Superior = 56
Largura = 17
Altura = 17
Legenda = 'Botão2'
Ordem de Tabulação = 3
OnClick = Button4Click
fim
fim
各种不同的事件声名:
TForm1 = classe(TForm)
Botão1: Botão T;
Botão2: Botão T;
Botão3: Botão T;
Botão4: Botão T;
Procedimento Button1Click(Remetente: TObject);
procedimento Button2Click(Remetente: TObject);
procedimento Button3Click(Remetente: TObject);
procedimento Button4Click(Remetente: TObject);
privado
procedimento WMmove(var Mensagem: TWMNCHITTEST); Mensagem WM_NCHITTEST;
{Declarações privadas}
público
{Declarações públicas}
fim;
var
Formulário1: TForm1;
implementação
{$R *.DFM}
procedimento TForm1.WMmove(var Mensagem: TWMNCHITTEST);
começar
Mensagem.Resultado := HTCAPTION;
fim;
procedimento TForm1.Button1Click(Remetente: TObject);
var
R1,R2,R3,R4,R5: HRGN;
começar
R1 := CreateEllipticRgn(0,0,Round(ClientWidth / 2),ClientHeight);
R2 := CreateEllipticRgn(Round(ClientWidth / 2),0,ClientWidth,ClientHeight);
R3 := CreateEllipticRgn(Round(ClientWidth / 4 ),Round(ClientHeight / 4 *3),Round(ClientWidth / 4 *3),ClientHeight);
R4 := CriarRectRgn(0,0,0,0);
R5 := CriarRectRgn(0,0,0,0);
CombineRgn(R4,R2,R1,RGN_ou);
CombineRgn(R5,R4,R3,RGN_ou);
SetWindowRGN(Handle,R5,True);
ExcluirObjeto(R1);
ExcluirObjeto(R2);
ExcluirObjeto(R3);
ExcluirObjeto(R4);
ExcluirObjeto(R5);
fim;
procedimento TForm1.Button2Click(Remetente: TObject);
começar
EnviarMensagem(Handle,WM_SYSCOMMAND,SC_MINIMIZE,0);
fim;
procedimento TForm1.Button3Click(Remetente: TObject);
começar
EnviarMensagem(Handle,WM_SYSCOMMAND,SC_DEFAULT,0);
fim;
procedimento TForm1.Button4Click(Remetente: TObject);
começar
aplicação.Terminar;
fim;
fim.