Forms Delphi

Title: How to create a form in a form
Question: How to create a form in a form
This shows you the very easy and straight forwarded code to create a form in a form, in this case it will be a moveable and resizeable form in a form, a not moveable and resizeable form in a form, and a no titlebar form in a form. A compiled example is included of each as is the full source code of course, as well as a template for use as a starting point. Do not rely on third party components if you do not have to!
Answer:
Various versions of how to create a form that resides in another form, with the second being movable, resizable but also not movable and not resizable as well as one without a titlebar
===========================================
===========================================
Movable and resizeable form in a form
===========================================
===========================================
Project1.dpr
program Project1;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit2 in 'Unit2.pas' {Form2};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm2, Form2);
Application.Run;
end.
===========================================
Unit1.pas
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
btnShowFrm2: TButton;
btnHideForm2: TButton;
Bevel1: TBevel;
procedure FormActivate(Sender: TObject);
procedure FormDeactivate(Sender: TObject);
procedure btnShowFrm2Click(Sender: TObject);
procedure btnHideForm2Click(Sender: TObject);
protected
procedure WMNCLButtonDown(var Msg: TWMNCLButtonDown); message WM_NCLBUTTONDOWN;
procedure BroadCastDeactivate;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses
unit2;

{$R *.dfm}
procedure TForm1.BroadCastDeactivate;
var
tmpMessage: TMessage;
begin
with tmpMessage do
begin
Msg := WM_NCACTIVATE;
WParam := Integer(False);
LParam := 0;
end;
Self.BroadCast(tmpMessage);
end;
procedure TForm1.WMNCLButtonDown(var Msg: TWMNCLButtonDown);
begin
inherited;
BroadCastDeactivate;
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
BroadCastDeactivate;
end;
procedure TForm1.FormDeactivate(Sender: TObject);
begin
BroadCastDeactivate;
end;
procedure TForm1.btnShowFrm2Click(Sender: TObject);
begin
Form2.Show;
end;
procedure TForm1.btnHideForm2Click(Sender: TObject);
begin
Form2.Hide;
end;
end.
===========================================
Unit1.dfm
object Form1: TForm1
Left = 198
Top = 202
Width = 322
Height = 304
HorzScrollBar.Visible = False
VertScrollBar.Visible = False
Caption = 'Form1 - See the included Readme.txt'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Icon.Data = {
0000010002002020000001001800A80C00002600000010100000010018006803
0000CE0C00002800000020000000400000000100180000000000800C00000000
0000000000000000000000000000FBF9F9F7F3F0F3EBE5F3E9E3F3EBE4F4EBE5
F4EBE5F4ECE5F4ECE5F5ECE6F5ECE6F4EDE7F4ECE7F5EDE8F6EDE7F7EFE8F6EF
E8F7EEE9F7EEE8F7EFE9F7EFE9F8F1EBFAF4F0FAF6F1F9F3EEF9F1ECF8F2EBFA
F3ECFAF3ECFBF4EDFCF7F3FCFAF8F9F5F2EEE1D9DFC6B5DDC0ADDEC4B1E0C5B3
E0C6B4E0C6B3E0C5B2E1C6B2E2C7B4E2C8B5E3C9B6E5CBB8E6CDBAE8CFBDE8D0
BDE9D0BEEAD1BFEBD3C0ECD4C1EDD6C3EED8C6EFDAC8EFDAC7F0DAC7F0DBC7F2
DCC9F2DCC8F4E0CDF8ECE1FCF7F3F7F0ECE4CFC0CAA083C59676C89B7CCA9D7E
CB9F80CEA284CFA687D2A88AD2AA8BD3AB8DD5AC8FD6AD8ED7AE8ED8AF8FDAB0
90DBB292DDB394DEB596E0B797E1B999E2BB9BE3BD9DE5BF9EE7C1A0E8C3A2EA
C4A4EBC4A2EECBABF4E0CEFBF4EDF6EFEAE2CABAC59677C08B68C3916FC49270
C69674D0A789DCBCA4E2C6B1E4C9B3E4C9B5E3C7B2DFBDA3D7AC8DD4A683D6A8
85D7AA87D9AC89DAAE8BDDB08DDEB28EDFB490E1B692E3B894E5BB96E6BD99E8
BF9BE9BF99ECC6A3F3DEC9FAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C89A79DAB9A2F1E1D6F7EEE7F4E9E1F5EBE4F7EDE6EEDACBDDB79BD5A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADEC0AAF6EBE3EADED7CEB5A9D4BFB6F1E8E4F2E4D9DEBAA0D5A785D6A9
87D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADFC1ABF4E8DFD0B8AC97644FA47968E1D2CDF2E4DADEBBA0D5A785D6A9
87D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DEC9ADA0854A33956350DCCCC6F2E5DBDEBCA1D5A886D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DECAAEA2894F38986754DDCDC7F2E5DBDEBCA1D5A886D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BECC7A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAEA38A4F38996754DECEC8F2E5DBDDBBA1D4A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BECC7A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAEA38A4F38996754DECEC8F2E5DBDDBBA1D4A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BEBC6A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAFA38A5039996855DECEC8F1E4DADDB99FD4A682D6A8
85D8AB88DAAD8ADBAF8CDDB18EDEB38FDFB693E2B996E4BB98E6BD9AE7BF9CE8
C09CE8BF9AEAC5A4F2DDC9FAF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAFA38A5039996855DECEC8F1E4DADDBAA0D4A783D6A9
86D8AC89DAAE8BDBB08DDDB28FDEB490DFB693E2B996E4BB98E6BD9AE7BF9CE8
C09CE7BF9AE9C5A3F2DDC9FAF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCAAEA28A4F38996855DFD0CAF7EEE7E8CFBCE1C1A7E2C2
AAE3C4ABE5C6ADE6C7AEE7C8AFE6C5AAE2BD9DE1B895E3BA97E6BD9AE7BF9CE7
BF9CE7BE9AE9C4A3F1DCC8F9F4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCAAEA28A4F38996753DFD0C9FBF9F6F5EDE7F2E8DFF3E8
DFF3E8DFF3E8E0F4EAE2F7ECE4F3E3D6E8CAB0E1B895E3B995E6BD9AE7BF9CE7
BF9CE7BE9AE9C4A3F1DCC8F9F4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBB0A48A50398D553FC0A296D7C4BDD6C3BBD5C2BAD5C2
BAD4C0B9D4C0B8DDCDC7F2EBE8F9F1E9ECD1BAE2B996E3B995E6BD9AE7BF9CE8
C09DE8BF9BEAC5A4F2DDC9FAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCDB2A68A503978361D8A513B925D48925D48915C47915C
47905A468F5943A67B6ADCC9C1F8EEE5EED4BCE4BB98E4BA96E6BD9AE7BF9CE8
C09DE9C09BECC7A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C1ABF3E7DECDB2A68A503977351B874D368F59439059448F58438E58
418D553F8C543CA47764DAC6BDF8EDE3F0D4BCE6BD9AE5BB97E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EEF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C1ABF3E7DECBB0A48A50398B533DBD9D90D4C0B8D6C2BAD5C1B9D4BE
B4D3BBB0D2BAAFDCC8BFF0E6E1F8EEE5EFD3BBE6BE9BE5BB97E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4E0CEFCF7F3F7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ACF4E8E0CBAFA48A5039986753DECFC8FCFAF8FAF3EDF7EDE5F6EA
E1F5E9DEF6E9DEF6EADFF6EAE0F3E1D2EBCCB1E5BD9AE5BB97E6BC99E7BF9CE9
C19EEAC19CEDC8A6F4E0CEFCF7F3F7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C3AEF5EBE4CBB1A78A5039996855E0D1CBF8F0E9EAD2C0E3C4ABE4C4
ABE5C5ACE7C7ADE7C7AEE7C7ADE5C4A8E3BD9CE2B995E4BA96E6BC99E7BF9CE9
C19EEAC19CEDC8A6F4DFCCFBF5EFF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C3AFF5ECE5CBB2A88A5039996855DECFC9F4E9E1E3C6B0DCB697DDB7
9ADFBA9CE1BB9EE2BDA0E3BFA2E4C0A2E4C2A4E5C1A2E5BE9DE6BD9AE6BE9BE9
C19EEAC19CEDC8A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ADF4E9E1CBB0A58A5039996855E1D2CDFDF9F5F5E8DCF2DFCFF3E0
D1F3E1D2F4E2D2F4E3D4F5E4D5F5E3D5F3E3D5F0DBC9EAC9AEE6BD9AE6BD9AE9
C19EEAC19CEDC8A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ACF4E8DFCBAFA3894F38915C47CDB6ACE8DDD7E8DBD4E8D9D0E8D9
D0E8DAD0E8DAD1E8DAD1E8D9D1ECDED8F5EEE9F7EDE4EED2BBE6BD9AE6BD99E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DECBAFA3864A3379381F95634EA37664A37663A47663A376
63A47663A47764A37663A17360B38C7DDECDC5F8EEE6F0D5BFE6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADFC1ABF4E8DFD3BBB196634F7F412982472F8549328549328649318549
31864A32864B33854A3282462E9A6854D4BDB3F8EDE6F0D6C0E6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADEC0AAF6EBE3EADFD9CCB4ABBFA196BEA095BEA094BEA094BFA094BEA0
94BFA095BFA195BDA095BC9D92C9B0A6E8DEDAFAF2ECF0D6C0E6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C89A79DAB9A2F1E1D6F6EDE7F1E8E3EFE6E2EFE7E2F0E8E2F1E8E2F1E8E2F1E8
E2F1E8E3F1E9E3F0E8E3F1E8E3F3EBE6F8F2EFF7EDE3EED1BAE6BD9AE6BD99E8
C09DE9C09BECC7A5F3DECAFAF4EDF6EFEAE2CABAC59676C08B68C3916FC49270
C69674D0A689DCBBA4E1C5B0E3C8B4E3CAB7E4CBB8E6CCB8E7CDB9E7CFBAE9CF
BBE9D0BCEAD1BDEBD2BFECD3C0EDD4C0ECD5C1EBD0B9E8C3A5E5BB97E5BC97E7
BE9AE8BD98EAC4A2F2DCC8FAF3ECF7F0ECE4CFC0CAA083C69676C99C7DCA9D7E
CB9F81CEA384D0A687D2A88AD3AA8CD3AB8DD5AD8FD7AE90D9B092DAB294DBB3
94DCB596DEB798DFB89AE1BA9CE2BC9CE3BE9FE4BFA0E6C0A0E7C1A0E8C3A2E9
C4A3E9C3A1EBC8A9F2DFCCFAF4EDFAF6F2F1E4DBE4CDBCE1C7B5E3CAB9E4CBB9
E4CCBBE5CCBAE4CBB8E5CCB9E6CDBAE6CDBBE7CEBCE8CFBDE9D0BEE9D1BFEAD2
BFEBD3C0ECD4C1ECD5C2EDD6C3EED7C3EED8C4EFD9C6F0DBC8F2DDCAF2DECBF3
DECCF2DDCAF3E0CFF8ECE1FBF7F3FCF9F7FAF4EEF6EBE4F4E9E1F5EBE3F6EBE2
F6EBE3F6ECE3F6ECE4F6ECE5F6ECE5F7ECE5F7EDE5F7ECE5F7ECE6F7EDE6F8ED
E6F8EEE6F8EFE6F8EFE7F8EFE7F8EFE7F8F0E7F9F0E7F9F0E8F9F0E8F9F0E8F9
F0E8F8EFE7FAF1E9FBF5F1FCFAF7000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000280000001000000020000000010018000000
00004003000000000000000000000000000000000000FCFAFAF2E8E1F2E7E1F2
E9E1F3E9E2F4EAE3F4EBE4F5ECE4F6ECE5F7EDE6F7EEE8FAF3EEF9F0E9F9F1E9
FAF2EBFDFBF8F8F2EDCCA386CA9D7ECCA182D3AC8FD6AF92D8B295D8AF8FDBB2
93DEB696E1BA99E4BE9EE7C1A1EAC5A4EECDAEFAF2EBF8F2EDC89B7CC69675CD
A182F3E7DDECDED5F5E8DFD9AF90D9AD8BDCB18EDFB592E2B996E5BD9AE9C19D
EDC8A7FAF2EAF8F2EDC89B7CC69675CDA182ECDDD495624CEADED7D9B091D9AD
8BDCB18EDFB592E2B996E5BD9AE9C19DEDC8A7FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A5139EADED7D9B091D9AD8BDCB18EDFB592E2B996E5BD9AE9C19D
ECC8A7FAF2EAF8F2EDC89B7CC69675CDA182ECDDD48A5039EADED7D9AF90D9AD
8BDCB18EDFB592E2B996E5BD9AE8C09DEBC7A5FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A5039EADED7DBB699DBB393DEB697E1BA9AE2B996E5BD9AE8C09D
EAC5A4FAF2EAF8F2EDC89B7CC69675CDA182ECDDD48A5039E2D4CEEADED7EADE
D7EBDFD8F8EFE7E5BF9FE5BD9AE8C09DEAC6A5FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD47F40278A503A8A513A8A513996624CEFE1D8E7C1A1E6BD9AE9C19D
ECC8A7FAF2EBF8F2EDC89B7CC69675CDA182ECDED58A5039E2D4CEEFE4DEEEE0
D7EEDFD6F7ECE2E8C3A2E6BD9AE9C19DEDC9A8FCF6F0F8F2EDC89B7CC69675CD
A183EDE1DA8A513AEADED7DFBDA3DEB99CE1BC9FE3BFA2E4BE9EE5BD9AE9C19D
EDC8A7FAF2EBF8F2EDC89B7CC69675CDA182ECDED58A5039E2D4CDEDDFD6EDDF
D6EEE0D6EEE0D7F8ECE3E8C2A1E9C19DEDC8A7FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A50398A503A8B513A8B513A8B533C97634EEFE1D9E8C2A1E9C19D
EDC8A7FAF2EAF8F2EDC89B7CC69675CDA182F3E6DDE9DDD6E9DDD7EADED7EADE
D8EADFD9EBE0DAF9F0E8E8C2A2E9C19DECC8A7FAF2EAF8F2EDCCA387CA9E7FCD
A182D4AC8FD6AF93D8B296DBB599DEB99CE1BC9FE3BFA2E6C3A6E7C1A1EAC5A4
ECCBACFAF2EBFDFBF9F7EDE6F7EDE5F7EDE6F7EEE7F7EEE7F8EEE8F8EFE8F8F0
E8F9F0E9F9F1E9F9F1E9FAF1EAFAF2EAFAF2EBFDFBF800000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000}
OldCreateOrder = False
OnActivate = FormActivate
OnDeactivate = FormDeactivate
PixelsPerInch = 96
TextHeight = 13
object Bevel1: TBevel
Left = 0
Top = 0
Width = 201
Height = 273
end
object Bevel2: TBevel
Left = 208
Top = 0
Width = 100
Height = 80
Shape = bsFrame
end
object BtnShowFrm2: TButton
Tag = 1
Left = 210
Top = 2
Width = 96
Height = 38
Cursor = crHandPoint
Caption = 'Show Form'
TabOrder = 0
OnClick = BtnShowFrm2Click
end
object btnHideForm2: TButton
Left = 210
Top = 40
Width = 96
Height = 38
Cursor = crHandPoint
Caption = 'Hide Form'
TabOrder = 1
OnClick = btnHideForm2Click
end
end
===========================================
Unit2.pas
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
btnShowFrm2: TButton;
btnHideForm2: TButton;
Bevel1: TBevel;
procedure FormActivate(Sender: TObject);
procedure FormDeactivate(Sender: TObject);
procedure btnShowFrm2Click(Sender: TObject);
procedure btnHideForm2Click(Sender: TObject);
protected
procedure WMNCLButtonDown(var Msg: TWMNCLButtonDown); message WM_NCLBUTTONDOWN;
procedure BroadCastDeactivate;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses
unit2;

{$R *.dfm}
procedure TForm1.BroadCastDeactivate;
var
tmpMessage: TMessage;
begin
with tmpMessage do
begin
Msg := WM_NCACTIVATE;
WParam := Integer(False);
LParam := 0;
end;
Self.BroadCast(tmpMessage);
end;
procedure TForm1.WMNCLButtonDown(var Msg: TWMNCLButtonDown);
begin
inherited;
BroadCastDeactivate;
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
BroadCastDeactivate;
end;
procedure TForm1.FormDeactivate(Sender: TObject);
begin
BroadCastDeactivate;
end;
procedure TForm1.btnShowFrm2Click(Sender: TObject);
begin
Form2.Show;
end;
procedure TForm1.btnHideForm2Click(Sender: TObject);
begin
Form2.Hide;
end;
end.
===========================================
Unit2.dfm
object Form2: TForm2
Left = 414
Top = 229
Width = 200
Height = 272
HorzScrollBar.Visible = False
VertScrollBar.Visible = False
BorderIcons = []
Caption = 'Form2'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Icon.Data = {
0000010002002020000001001800A80C00002600000010100000010018006803
0000CE0C00002800000020000000400000000100180000000000800C00000000
0000000000000000000000000000FBF9F9F7F3F0F3EBE5F3E9E3F3EBE4F4EBE5
F4EBE5F4ECE5F4ECE5F5ECE6F5ECE6F4EDE7F4ECE7F5EDE8F6EDE7F7EFE8F6EF
E8F7EEE9F7EEE8F7EFE9F7EFE9F8F1EBFAF4F0FAF6F1F9F3EEF9F1ECF8F2EBFA
F3ECFAF3ECFBF4EDFCF7F3FCFAF8F9F5F2EEE1D9DFC6B5DDC0ADDEC4B1E0C5B3
E0C6B4E0C6B3E0C5B2E1C6B2E2C7B4E2C8B5E3C9B6E5CBB8E6CDBAE8CFBDE8D0
BDE9D0BEEAD1BFEBD3C0ECD4C1EDD6C3EED8C6EFDAC8EFDAC7F0DAC7F0DBC7F2
DCC9F2DCC8F4E0CDF8ECE1FCF7F3F7F0ECE4CFC0CAA083C59676C89B7CCA9D7E
CB9F80CEA284CFA687D2A88AD2AA8BD3AB8DD5AC8FD6AD8ED7AE8ED8AF8FDAB0
90DBB292DDB394DEB596E0B797E1B999E2BB9BE3BD9DE5BF9EE7C1A0E8C3A2EA
C4A4EBC4A2EECBABF4E0CEFBF4EDF6EFEAE2CABAC59677C08B68C3916FC49270
C69674D0A789DCBCA4E2C6B1E4C9B3E4C9B5E3C7B2DFBDA3D7AC8DD4A683D6A8
85D7AA87D9AC89DAAE8BDDB08DDEB28EDFB490E1B692E3B894E5BB96E6BD99E8
BF9BE9BF99ECC6A3F3DEC9FAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C89A79DAB9A2F1E1D6F7EEE7F4E9E1F5EBE4F7EDE6EEDACBDDB79BD5A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADEC0AAF6EBE3EADED7CEB5A9D4BFB6F1E8E4F2E4D9DEBAA0D5A785D6A9
87D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADFC1ABF4E8DFD0B8AC97644FA47968E1D2CDF2E4DADEBBA0D5A785D6A9
87D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DEC9ADA0854A33956350DCCCC6F2E5DBDEBCA1D5A886D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DECAAEA2894F38986754DDCDC7F2E5DBDEBCA1D5A886D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BECC7A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAEA38A4F38996754DECEC8F2E5DBDDBBA1D4A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BECC7A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAEA38A4F38996754DECEC8F2E5DBDDBBA1D4A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BEBC6A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAFA38A5039996855DECEC8F1E4DADDB99FD4A682D6A8
85D8AB88DAAD8ADBAF8CDDB18EDEB38FDFB693E2B996E4BB98E6BD9AE7BF9CE8
C09CE8BF9AEAC5A4F2DDC9FAF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAFA38A5039996855DECEC8F1E4DADDBAA0D4A783D6A9
86D8AC89DAAE8BDBB08DDDB28FDEB490DFB693E2B996E4BB98E6BD9AE7BF9CE8
C09CE7BF9AE9C5A3F2DDC9FAF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCAAEA28A4F38996855DFD0CAF7EEE7E8CFBCE1C1A7E2C2
AAE3C4ABE5C6ADE6C7AEE7C8AFE6C5AAE2BD9DE1B895E3BA97E6BD9AE7BF9CE7
BF9CE7BE9AE9C4A3F1DCC8F9F4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCAAEA28A4F38996753DFD0C9FBF9F6F5EDE7F2E8DFF3E8
DFF3E8DFF3E8E0F4EAE2F7ECE4F3E3D6E8CAB0E1B895E3B995E6BD9AE7BF9CE7
BF9CE7BE9AE9C4A3F1DCC8F9F4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBB0A48A50398D553FC0A296D7C4BDD6C3BBD5C2BAD5C2
BAD4C0B9D4C0B8DDCDC7F2EBE8F9F1E9ECD1BAE2B996E3B995E6BD9AE7BF9CE8
C09DE8BF9BEAC5A4F2DDC9FAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCDB2A68A503978361D8A513B925D48925D48915C47915C
47905A468F5943A67B6ADCC9C1F8EEE5EED4BCE4BB98E4BA96E6BD9AE7BF9CE8
C09DE9C09BECC7A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C1ABF3E7DECDB2A68A503977351B874D368F59439059448F58438E58
418D553F8C543CA47764DAC6BDF8EDE3F0D4BCE6BD9AE5BB97E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EEF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C1ABF3E7DECBB0A48A50398B533DBD9D90D4C0B8D6C2BAD5C1B9D4BE
B4D3BBB0D2BAAFDCC8BFF0E6E1F8EEE5EFD3BBE6BE9BE5BB97E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4E0CEFCF7F3F7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ACF4E8E0CBAFA48A5039986753DECFC8FCFAF8FAF3EDF7EDE5F6EA
E1F5E9DEF6E9DEF6EADFF6EAE0F3E1D2EBCCB1E5BD9AE5BB97E6BC99E7BF9CE9
C19EEAC19CEDC8A6F4E0CEFCF7F3F7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C3AEF5EBE4CBB1A78A5039996855E0D1CBF8F0E9EAD2C0E3C4ABE4C4
ABE5C5ACE7C7ADE7C7AEE7C7ADE5C4A8E3BD9CE2B995E4BA96E6BC99E7BF9CE9
C19EEAC19CEDC8A6F4DFCCFBF5EFF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C3AFF5ECE5CBB2A88A5039996855DECFC9F4E9E1E3C6B0DCB697DDB7
9ADFBA9CE1BB9EE2BDA0E3BFA2E4C0A2E4C2A4E5C1A2E5BE9DE6BD9AE6BE9BE9
C19EEAC19CEDC8A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ADF4E9E1CBB0A58A5039996855E1D2CDFDF9F5F5E8DCF2DFCFF3E0
D1F3E1D2F4E2D2F4E3D4F5E4D5F5E3D5F3E3D5F0DBC9EAC9AEE6BD9AE6BD9AE9
C19EEAC19CEDC8A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ACF4E8DFCBAFA3894F38915C47CDB6ACE8DDD7E8DBD4E8D9D0E8D9
D0E8DAD0E8DAD1E8DAD1E8D9D1ECDED8F5EEE9F7EDE4EED2BBE6BD9AE6BD99E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DECBAFA3864A3379381F95634EA37664A37663A47663A376
63A47663A47764A37663A17360B38C7DDECDC5F8EEE6F0D5BFE6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADFC1ABF4E8DFD3BBB196634F7F412982472F8549328549328649318549
31864A32864B33854A3282462E9A6854D4BDB3F8EDE6F0D6C0E6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADEC0AAF6EBE3EADFD9CCB4ABBFA196BEA095BEA094BEA094BFA094BEA0
94BFA095BFA195BDA095BC9D92C9B0A6E8DEDAFAF2ECF0D6C0E6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C89A79DAB9A2F1E1D6F6EDE7F1E8E3EFE6E2EFE7E2F0E8E2F1E8E2F1E8E2F1E8
E2F1E8E3F1E9E3F0E8E3F1E8E3F3EBE6F8F2EFF7EDE3EED1BAE6BD9AE6BD99E8
C09DE9C09BECC7A5F3DECAFAF4EDF6EFEAE2CABAC59676C08B68C3916FC49270
C69674D0A689DCBBA4E1C5B0E3C8B4E3CAB7E4CBB8E6CCB8E7CDB9E7CFBAE9CF
BBE9D0BCEAD1BDEBD2BFECD3C0EDD4C0ECD5C1EBD0B9E8C3A5E5BB97E5BC97E7
BE9AE8BD98EAC4A2F2DCC8FAF3ECF7F0ECE4CFC0CAA083C69676C99C7DCA9D7E
CB9F81CEA384D0A687D2A88AD3AA8CD3AB8DD5AD8FD7AE90D9B092DAB294DBB3
94DCB596DEB798DFB89AE1BA9CE2BC9CE3BE9FE4BFA0E6C0A0E7C1A0E8C3A2E9
C4A3E9C3A1EBC8A9F2DFCCFAF4EDFAF6F2F1E4DBE4CDBCE1C7B5E3CAB9E4CBB9
E4CCBBE5CCBAE4CBB8E5CCB9E6CDBAE6CDBBE7CEBCE8CFBDE9D0BEE9D1BFEAD2
BFEBD3C0ECD4C1ECD5C2EDD6C3EED7C3EED8C4EFD9C6F0DBC8F2DDCAF2DECBF3
DECCF2DDCAF3E0CFF8ECE1FBF7F3FCF9F7FAF4EEF6EBE4F4E9E1F5EBE3F6EBE2
F6EBE3F6ECE3F6ECE4F6ECE5F6ECE5F7ECE5F7EDE5F7ECE5F7ECE6F7EDE6F8ED
E6F8EEE6F8EFE6F8EFE7F8EFE7F8EFE7F8F0E7F9F0E7F9F0E8F9F0E8F9F0E8F9
F0E8F8EFE7FAF1E9FBF5F1FCFAF7000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000280000001000000020000000010018000000
00004003000000000000000000000000000000000000FCFAFAF2E8E1F2E7E1F2
E9E1F3E9E2F4EAE3F4EBE4F5ECE4F6ECE5F7EDE6F7EEE8FAF3EEF9F0E9F9F1E9
FAF2EBFDFBF8F8F2EDCCA386CA9D7ECCA182D3AC8FD6AF92D8B295D8AF8FDBB2
93DEB696E1BA99E4BE9EE7C1A1EAC5A4EECDAEFAF2EBF8F2EDC89B7CC69675CD
A182F3E7DDECDED5F5E8DFD9AF90D9AD8BDCB18EDFB592E2B996E5BD9AE9C19D
EDC8A7FAF2EAF8F2EDC89B7CC69675CDA182ECDDD495624CEADED7D9B091D9AD
8BDCB18EDFB592E2B996E5BD9AE9C19DEDC8A7FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A5139EADED7D9B091D9AD8BDCB18EDFB592E2B996E5BD9AE9C19D
ECC8A7FAF2EAF8F2EDC89B7CC69675CDA182ECDDD48A5039EADED7D9AF90D9AD
8BDCB18EDFB592E2B996E5BD9AE8C09DEBC7A5FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A5039EADED7DBB699DBB393DEB697E1BA9AE2B996E5BD9AE8C09D
EAC5A4FAF2EAF8F2EDC89B7CC69675CDA182ECDDD48A5039E2D4CEEADED7EADE
D7EBDFD8F8EFE7E5BF9FE5BD9AE8C09DEAC6A5FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD47F40278A503A8A513A8A513996624CEFE1D8E7C1A1E6BD9AE9C19D
ECC8A7FAF2EBF8F2EDC89B7CC69675CDA182ECDED58A5039E2D4CEEFE4DEEEE0
D7EEDFD6F7ECE2E8C3A2E6BD9AE9C19DEDC9A8FCF6F0F8F2EDC89B7CC69675CD
A183EDE1DA8A513AEADED7DFBDA3DEB99CE1BC9FE3BFA2E4BE9EE5BD9AE9C19D
EDC8A7FAF2EBF8F2EDC89B7CC69675CDA182ECDED58A5039E2D4CDEDDFD6EDDF
D6EEE0D6EEE0D7F8ECE3E8C2A1E9C19DEDC8A7FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A50398A503A8B513A8B513A8B533C97634EEFE1D9E8C2A1E9C19D
EDC8A7FAF2EAF8F2EDC89B7CC69675CDA182F3E6DDE9DDD6E9DDD7EADED7EADE
D8EADFD9EBE0DAF9F0E8E8C2A2E9C19DECC8A7FAF2EAF8F2EDCCA387CA9E7FCD
A182D4AC8FD6AF93D8B296DBB599DEB99CE1BC9FE3BFA2E6C3A6E7C1A1EAC5A4
ECCBACFAF2EBFDFBF9F7EDE6F7EDE5F7EDE6F7EEE7F7EEE7F8EEE8F8EFE8F8F0
E8F9F0E9F9F1E9F9F1E9FAF1EAFAF2EAFAF2EBFDFBF800000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000}
OldCreateOrder = False
Position = poDefaultPosOnly
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Bevel1: TBevel
Left = 9
Top = 9
Width = 174
Height = 226
Constraints.MaxHeight = 226
Constraints.MaxWidth = 174
Constraints.MinHeight = 226
Constraints.MinWidth = 174
Shape = bsFrame
end
end
===========================================
===========================================
Not movable and resizeable form in a form
===========================================
===========================================
Project1.dpr
program Project1;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit2 in 'Unit2.pas' {Form2};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm2, Form2);
Application.Run;
end.
===========================================
Unit1.pas
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
btnShowFrm2: TButton;
btnHideForm2: TButton;
Bevel1: TBevel;
Bevel2: TBevel;
procedure FormActivate(Sender: TObject);
procedure FormDeactivate(Sender: TObject);
procedure btnShowFrm2Click(Sender: TObject);
procedure btnHideForm2Click(Sender: TObject);
protected
procedure WMNCLButtonDown(var Msg: TWMNCLButtonDown); message WM_NCLBUTTONDOWN;
procedure BroadCastDeactivate;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses
unit2;

{$R *.dfm}
procedure TForm1.BroadCastDeactivate;
var
tmpMessage: TMessage;
begin
with tmpMessage do
begin
Msg := WM_NCACTIVATE;
WParam := Integer(False);
LParam := 0;
end;
Self.BroadCast(tmpMessage);
end;
procedure TForm1.WMNCLButtonDown(var Msg: TWMNCLButtonDown);
begin
inherited;
BroadCastDeactivate;
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
BroadCastDeactivate;
end;
procedure TForm1.FormDeactivate(Sender: TObject);
begin
BroadCastDeactivate;
end;
procedure TForm1.btnShowFrm2Click(Sender: TObject);
begin
Form2.Show;
end;
procedure TForm1.btnHideForm2Click(Sender: TObject);
begin
Form2.Hide;
end;
end.
===========================================
Unit1.dfm
object Form1: TForm1
Left = 198
Top = 202
Width = 322
Height = 304
HorzScrollBar.Visible = False
VertScrollBar.Visible = False
Caption = 'Form1 - See the included Readme.txt'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Icon.Data = {
0000010002002020000001001800A80C00002600000010100000010018006803
0000CE0C00002800000020000000400000000100180000000000800C00000000
0000000000000000000000000000FBF9F9F7F3F0F3EBE5F3E9E3F3EBE4F4EBE5
F4EBE5F4ECE5F4ECE5F5ECE6F5ECE6F4EDE7F4ECE7F5EDE8F6EDE7F7EFE8F6EF
E8F7EEE9F7EEE8F7EFE9F7EFE9F8F1EBFAF4F0FAF6F1F9F3EEF9F1ECF8F2EBFA
F3ECFAF3ECFBF4EDFCF7F3FCFAF8F9F5F2EEE1D9DFC6B5DDC0ADDEC4B1E0C5B3
E0C6B4E0C6B3E0C5B2E1C6B2E2C7B4E2C8B5E3C9B6E5CBB8E6CDBAE8CFBDE8D0
BDE9D0BEEAD1BFEBD3C0ECD4C1EDD6C3EED8C6EFDAC8EFDAC7F0DAC7F0DBC7F2
DCC9F2DCC8F4E0CDF8ECE1FCF7F3F7F0ECE4CFC0CAA083C59676C89B7CCA9D7E
CB9F80CEA284CFA687D2A88AD2AA8BD3AB8DD5AC8FD6AD8ED7AE8ED8AF8FDAB0
90DBB292DDB394DEB596E0B797E1B999E2BB9BE3BD9DE5BF9EE7C1A0E8C3A2EA
C4A4EBC4A2EECBABF4E0CEFBF4EDF6EFEAE2CABAC59677C08B68C3916FC49270
C69674D0A789DCBCA4E2C6B1E4C9B3E4C9B5E3C7B2DFBDA3D7AC8DD4A683D6A8
85D7AA87D9AC89DAAE8BDDB08DDEB28EDFB490E1B692E3B894E5BB96E6BD99E8
BF9BE9BF99ECC6A3F3DEC9FAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C89A79DAB9A2F1E1D6F7EEE7F4E9E1F5EBE4F7EDE6EEDACBDDB79BD5A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADEC0AAF6EBE3EADED7CEB5A9D4BFB6F1E8E4F2E4D9DEBAA0D5A785D6A9
87D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADFC1ABF4E8DFD0B8AC97644FA47968E1D2CDF2E4DADEBBA0D5A785D6A9
87D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DEC9ADA0854A33956350DCCCC6F2E5DBDEBCA1D5A886D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DECAAEA2894F38986754DDCDC7F2E5DBDEBCA1D5A886D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BECC7A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAEA38A4F38996754DECEC8F2E5DBDDBBA1D4A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BECC7A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAEA38A4F38996754DECEC8F2E5DBDDBBA1D4A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BEBC6A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAFA38A5039996855DECEC8F1E4DADDB99FD4A682D6A8
85D8AB88DAAD8ADBAF8CDDB18EDEB38FDFB693E2B996E4BB98E6BD9AE7BF9CE8
C09CE8BF9AEAC5A4F2DDC9FAF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAFA38A5039996855DECEC8F1E4DADDBAA0D4A783D6A9
86D8AC89DAAE8BDBB08DDDB28FDEB490DFB693E2B996E4BB98E6BD9AE7BF9CE8
C09CE7BF9AE9C5A3F2DDC9FAF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCAAEA28A4F38996855DFD0CAF7EEE7E8CFBCE1C1A7E2C2
AAE3C4ABE5C6ADE6C7AEE7C8AFE6C5AAE2BD9DE1B895E3BA97E6BD9AE7BF9CE7
BF9CE7BE9AE9C4A3F1DCC8F9F4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCAAEA28A4F38996753DFD0C9FBF9F6F5EDE7F2E8DFF3E8
DFF3E8DFF3E8E0F4EAE2F7ECE4F3E3D6E8CAB0E1B895E3B995E6BD9AE7BF9CE7
BF9CE7BE9AE9C4A3F1DCC8F9F4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBB0A48A50398D553FC0A296D7C4BDD6C3BBD5C2BAD5C2
BAD4C0B9D4C0B8DDCDC7F2EBE8F9F1E9ECD1BAE2B996E3B995E6BD9AE7BF9CE8
C09DE8BF9BEAC5A4F2DDC9FAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCDB2A68A503978361D8A513B925D48925D48915C47915C
47905A468F5943A67B6ADCC9C1F8EEE5EED4BCE4BB98E4BA96E6BD9AE7BF9CE8
C09DE9C09BECC7A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C1ABF3E7DECDB2A68A503977351B874D368F59439059448F58438E58
418D553F8C543CA47764DAC6BDF8EDE3F0D4BCE6BD9AE5BB97E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EEF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C1ABF3E7DECBB0A48A50398B533DBD9D90D4C0B8D6C2BAD5C1B9D4BE
B4D3BBB0D2BAAFDCC8BFF0E6E1F8EEE5EFD3BBE6BE9BE5BB97E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4E0CEFCF7F3F7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ACF4E8E0CBAFA48A5039986753DECFC8FCFAF8FAF3EDF7EDE5F6EA
E1F5E9DEF6E9DEF6EADFF6EAE0F3E1D2EBCCB1E5BD9AE5BB97E6BC99E7BF9CE9
C19EEAC19CEDC8A6F4E0CEFCF7F3F7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C3AEF5EBE4CBB1A78A5039996855E0D1CBF8F0E9EAD2C0E3C4ABE4C4
ABE5C5ACE7C7ADE7C7AEE7C7ADE5C4A8E3BD9CE2B995E4BA96E6BC99E7BF9CE9
C19EEAC19CEDC8A6F4DFCCFBF5EFF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C3AFF5ECE5CBB2A88A5039996855DECFC9F4E9E1E3C6B0DCB697DDB7
9ADFBA9CE1BB9EE2BDA0E3BFA2E4C0A2E4C2A4E5C1A2E5BE9DE6BD9AE6BE9BE9
C19EEAC19CEDC8A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ADF4E9E1CBB0A58A5039996855E1D2CDFDF9F5F5E8DCF2DFCFF3E0
D1F3E1D2F4E2D2F4E3D4F5E4D5F5E3D5F3E3D5F0DBC9EAC9AEE6BD9AE6BD9AE9
C19EEAC19CEDC8A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ACF4E8DFCBAFA3894F38915C47CDB6ACE8DDD7E8DBD4E8D9D0E8D9
D0E8DAD0E8DAD1E8DAD1E8D9D1ECDED8F5EEE9F7EDE4EED2BBE6BD9AE6BD99E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DECBAFA3864A3379381F95634EA37664A37663A47663A376
63A47663A47764A37663A17360B38C7DDECDC5F8EEE6F0D5BFE6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADFC1ABF4E8DFD3BBB196634F7F412982472F8549328549328649318549
31864A32864B33854A3282462E9A6854D4BDB3F8EDE6F0D6C0E6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADEC0AAF6EBE3EADFD9CCB4ABBFA196BEA095BEA094BEA094BFA094BEA0
94BFA095BFA195BDA095BC9D92C9B0A6E8DEDAFAF2ECF0D6C0E6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C89A79DAB9A2F1E1D6F6EDE7F1E8E3EFE6E2EFE7E2F0E8E2F1E8E2F1E8E2F1E8
E2F1E8E3F1E9E3F0E8E3F1E8E3F3EBE6F8F2EFF7EDE3EED1BAE6BD9AE6BD99E8
C09DE9C09BECC7A5F3DECAFAF4EDF6EFEAE2CABAC59676C08B68C3916FC49270
C69674D0A689DCBBA4E1C5B0E3C8B4E3CAB7E4CBB8E6CCB8E7CDB9E7CFBAE9CF
BBE9D0BCEAD1BDEBD2BFECD3C0EDD4C0ECD5C1EBD0B9E8C3A5E5BB97E5BC97E7
BE9AE8BD98EAC4A2F2DCC8FAF3ECF7F0ECE4CFC0CAA083C69676C99C7DCA9D7E
CB9F81CEA384D0A687D2A88AD3AA8CD3AB8DD5AD8FD7AE90D9B092DAB294DBB3
94DCB596DEB798DFB89AE1BA9CE2BC9CE3BE9FE4BFA0E6C0A0E7C1A0E8C3A2E9
C4A3E9C3A1EBC8A9F2DFCCFAF4EDFAF6F2F1E4DBE4CDBCE1C7B5E3CAB9E4CBB9
E4CCBBE5CCBAE4CBB8E5CCB9E6CDBAE6CDBBE7CEBCE8CFBDE9D0BEE9D1BFEAD2
BFEBD3C0ECD4C1ECD5C2EDD6C3EED7C3EED8C4EFD9C6F0DBC8F2DDCAF2DECBF3
DECCF2DDCAF3E0CFF8ECE1FBF7F3FCF9F7FAF4EEF6EBE4F4E9E1F5EBE3F6EBE2
F6EBE3F6ECE3F6ECE4F6ECE5F6ECE5F7ECE5F7EDE5F7ECE5F7ECE6F7EDE6F8ED
E6F8EEE6F8EFE6F8EFE7F8EFE7F8EFE7F8F0E7F9F0E7F9F0E8F9F0E8F9F0E8F9
F0E8F8EFE7FAF1E9FBF5F1FCFAF7000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000280000001000000020000000010018000000
00004003000000000000000000000000000000000000FCFAFAF2E8E1F2E7E1F2
E9E1F3E9E2F4EAE3F4EBE4F5ECE4F6ECE5F7EDE6F7EEE8FAF3EEF9F0E9F9F1E9
FAF2EBFDFBF8F8F2EDCCA386CA9D7ECCA182D3AC8FD6AF92D8B295D8AF8FDBB2
93DEB696E1BA99E4BE9EE7C1A1EAC5A4EECDAEFAF2EBF8F2EDC89B7CC69675CD
A182F3E7DDECDED5F5E8DFD9AF90D9AD8BDCB18EDFB592E2B996E5BD9AE9C19D
EDC8A7FAF2EAF8F2EDC89B7CC69675CDA182ECDDD495624CEADED7D9B091D9AD
8BDCB18EDFB592E2B996E5BD9AE9C19DEDC8A7FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A5139EADED7D9B091D9AD8BDCB18EDFB592E2B996E5BD9AE9C19D
ECC8A7FAF2EAF8F2EDC89B7CC69675CDA182ECDDD48A5039EADED7D9AF90D9AD
8BDCB18EDFB592E2B996E5BD9AE8C09DEBC7A5FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A5039EADED7DBB699DBB393DEB697E1BA9AE2B996E5BD9AE8C09D
EAC5A4FAF2EAF8F2EDC89B7CC69675CDA182ECDDD48A5039E2D4CEEADED7EADE
D7EBDFD8F8EFE7E5BF9FE5BD9AE8C09DEAC6A5FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD47F40278A503A8A513A8A513996624CEFE1D8E7C1A1E6BD9AE9C19D
ECC8A7FAF2EBF8F2EDC89B7CC69675CDA182ECDED58A5039E2D4CEEFE4DEEEE0
D7EEDFD6F7ECE2E8C3A2E6BD9AE9C19DEDC9A8FCF6F0F8F2EDC89B7CC69675CD
A183EDE1DA8A513AEADED7DFBDA3DEB99CE1BC9FE3BFA2E4BE9EE5BD9AE9C19D
EDC8A7FAF2EBF8F2EDC89B7CC69675CDA182ECDED58A5039E2D4CDEDDFD6EDDF
D6EEE0D6EEE0D7F8ECE3E8C2A1E9C19DEDC8A7FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A50398A503A8B513A8B513A8B533C97634EEFE1D9E8C2A1E9C19D
EDC8A7FAF2EAF8F2EDC89B7CC69675CDA182F3E6DDE9DDD6E9DDD7EADED7EADE
D8EADFD9EBE0DAF9F0E8E8C2A2E9C19DECC8A7FAF2EAF8F2EDCCA387CA9E7FCD
A182D4AC8FD6AF93D8B296DBB599DEB99CE1BC9FE3BFA2E6C3A6E7C1A1EAC5A4
ECCBACFAF2EBFDFBF9F7EDE6F7EDE5F7EDE6F7EEE7F7EEE7F8EEE8F8EFE8F8F0
E8F9F0E9F9F1E9F9F1E9FAF1EAFAF2EAFAF2EBFDFBF800000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000}
OldCreateOrder = False
OnActivate = FormActivate
OnDeactivate = FormDeactivate
PixelsPerInch = 96
TextHeight = 13
object Bevel1: TBevel
Left = 0
Top = 0
Width = 200
Height = 272
end
object Bevel2: TBevel
Left = 208
Top = 0
Width = 100
Height = 80
Shape = bsFrame
end
object BtnShowFrm2: TButton
Tag = 1
Left = 210
Top = 2
Width = 96
Height = 38
Cursor = crHandPoint
Caption = 'Show Form'
TabOrder = 0
OnClick = BtnShowFrm2Click
end
object btnHideForm2: TButton
Left = 210
Top = 40
Width = 96
Height = 38
Cursor = crHandPoint
Caption = 'Hide Form'
TabOrder = 1
OnClick = btnHideForm2Click
end
end
===========================================
Unit2.pas
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls;
type
TForm2 = class(TForm)
Bevel1: TBevel;
procedure FormShow(Sender: TObject);
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure WMNCLButtonDown(var Msg: TWMNCLButtonDown); message WM_NCLBUTTONDOWN;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do
begin
WndParent := Application.MainForm.Handle;
Style := (Style or WS_CHILD) and not (WS_POPUP);
end;
Parent := Application.MainForm;
end;
procedure TForm2.WMNCLButtonDown(var Msg: TWMNCLButtonDown);
begin
PostMessage(Self.Handle, WM_NCACTIVATE, integer(true), 0);
end;
procedure TForm2.FormShow(Sender: TObject);
begin
PostMessage(Self.Handle, WM_NCACTIVATE, integer(true), 0);
end;
end.
===========================================
Unit2.dfm
object Form2: TForm2
Left = 414
Top = 229
HorzScrollBar.Visible = False
VertScrollBar.Visible = False
BorderIcons = []
BorderStyle = bsDialog
Caption = 'Form2'
ClientHeight = 245
ClientWidth = 192
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Icon.Data = {
0000010002002020000001001800A80C00002600000010100000010018006803
0000CE0C00002800000020000000400000000100180000000000800C00000000
0000000000000000000000000000FBF9F9F7F3F0F3EBE5F3E9E3F3EBE4F4EBE5
F4EBE5F4ECE5F4ECE5F5ECE6F5ECE6F4EDE7F4ECE7F5EDE8F6EDE7F7EFE8F6EF
E8F7EEE9F7EEE8F7EFE9F7EFE9F8F1EBFAF4F0FAF6F1F9F3EEF9F1ECF8F2EBFA
F3ECFAF3ECFBF4EDFCF7F3FCFAF8F9F5F2EEE1D9DFC6B5DDC0ADDEC4B1E0C5B3
E0C6B4E0C6B3E0C5B2E1C6B2E2C7B4E2C8B5E3C9B6E5CBB8E6CDBAE8CFBDE8D0
BDE9D0BEEAD1BFEBD3C0ECD4C1EDD6C3EED8C6EFDAC8EFDAC7F0DAC7F0DBC7F2
DCC9F2DCC8F4E0CDF8ECE1FCF7F3F7F0ECE4CFC0CAA083C59676C89B7CCA9D7E
CB9F80CEA284CFA687D2A88AD2AA8BD3AB8DD5AC8FD6AD8ED7AE8ED8AF8FDAB0
90DBB292DDB394DEB596E0B797E1B999E2BB9BE3BD9DE5BF9EE7C1A0E8C3A2EA
C4A4EBC4A2EECBABF4E0CEFBF4EDF6EFEAE2CABAC59677C08B68C3916FC49270
C69674D0A789DCBCA4E2C6B1E4C9B3E4C9B5E3C7B2DFBDA3D7AC8DD4A683D6A8
85D7AA87D9AC89DAAE8BDDB08DDEB28EDFB490E1B692E3B894E5BB96E6BD99E8
BF9BE9BF99ECC6A3F3DEC9FAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C89A79DAB9A2F1E1D6F7EEE7F4E9E1F5EBE4F7EDE6EEDACBDDB79BD5A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADEC0AAF6EBE3EADED7CEB5A9D4BFB6F1E8E4F2E4D9DEBAA0D5A785D6A9
87D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADFC1ABF4E8DFD0B8AC97644FA47968E1D2CDF2E4DADEBBA0D5A785D6A9
87D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DEC9ADA0854A33956350DCCCC6F2E5DBDEBCA1D5A886D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DECAAEA2894F38986754DDCDC7F2E5DBDEBCA1D5A886D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BECC7A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAEA38A4F38996754DECEC8F2E5DBDDBBA1D4A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BECC7A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAEA38A4F38996754DECEC8F2E5DBDDBBA1D4A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BEBC6A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAFA38A5039996855DECEC8F1E4DADDB99FD4A682D6A8
85D8AB88DAAD8ADBAF8CDDB18EDEB38FDFB693E2B996E4BB98E6BD9AE7BF9CE8
C09CE8BF9AEAC5A4F2DDC9FAF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAFA38A5039996855DECEC8F1E4DADDBAA0D4A783D6A9
86D8AC89DAAE8BDBB08DDDB28FDEB490DFB693E2B996E4BB98E6BD9AE7BF9CE8
C09CE7BF9AE9C5A3F2DDC9FAF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCAAEA28A4F38996855DFD0CAF7EEE7E8CFBCE1C1A7E2C2
AAE3C4ABE5C6ADE6C7AEE7C8AFE6C5AAE2BD9DE1B895E3BA97E6BD9AE7BF9CE7
BF9CE7BE9AE9C4A3F1DCC8F9F4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCAAEA28A4F38996753DFD0C9FBF9F6F5EDE7F2E8DFF3E8
DFF3E8DFF3E8E0F4EAE2F7ECE4F3E3D6E8CAB0E1B895E3B995E6BD9AE7BF9CE7
BF9CE7BE9AE9C4A3F1DCC8F9F4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBB0A48A50398D553FC0A296D7C4BDD6C3BBD5C2BAD5C2
BAD4C0B9D4C0B8DDCDC7F2EBE8F9F1E9ECD1BAE2B996E3B995E6BD9AE7BF9CE8
C09DE8BF9BEAC5A4F2DDC9FAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCDB2A68A503978361D8A513B925D48925D48915C47915C
47905A468F5943A67B6ADCC9C1F8EEE5EED4BCE4BB98E4BA96E6BD9AE7BF9CE8
C09DE9C09BECC7A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C1ABF3E7DECDB2A68A503977351B874D368F59439059448F58438E58
418D553F8C543CA47764DAC6BDF8EDE3F0D4BCE6BD9AE5BB97E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EEF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C1ABF3E7DECBB0A48A50398B533DBD9D90D4C0B8D6C2BAD5C1B9D4BE
B4D3BBB0D2BAAFDCC8BFF0E6E1F8EEE5EFD3BBE6BE9BE5BB97E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4E0CEFCF7F3F7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ACF4E8E0CBAFA48A5039986753DECFC8FCFAF8FAF3EDF7EDE5F6EA
E1F5E9DEF6E9DEF6EADFF6EAE0F3E1D2EBCCB1E5BD9AE5BB97E6BC99E7BF9CE9
C19EEAC19CEDC8A6F4E0CEFCF7F3F7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C3AEF5EBE4CBB1A78A5039996855E0D1CBF8F0E9EAD2C0E3C4ABE4C4
ABE5C5ACE7C7ADE7C7AEE7C7ADE5C4A8E3BD9CE2B995E4BA96E6BC99E7BF9CE9
C19EEAC19CEDC8A6F4DFCCFBF5EFF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C3AFF5ECE5CBB2A88A5039996855DECFC9F4E9E1E3C6B0DCB697DDB7
9ADFBA9CE1BB9EE2BDA0E3BFA2E4C0A2E4C2A4E5C1A2E5BE9DE6BD9AE6BE9BE9
C19EEAC19CEDC8A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ADF4E9E1CBB0A58A5039996855E1D2CDFDF9F5F5E8DCF2DFCFF3E0
D1F3E1D2F4E2D2F4E3D4F5E4D5F5E3D5F3E3D5F0DBC9EAC9AEE6BD9AE6BD9AE9
C19EEAC19CEDC8A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ACF4E8DFCBAFA3894F38915C47CDB6ACE8DDD7E8DBD4E8D9D0E8D9
D0E8DAD0E8DAD1E8DAD1E8D9D1ECDED8F5EEE9F7EDE4EED2BBE6BD9AE6BD99E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DECBAFA3864A3379381F95634EA37664A37663A47663A376
63A47663A47764A37663A17360B38C7DDECDC5F8EEE6F0D5BFE6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADFC1ABF4E8DFD3BBB196634F7F412982472F8549328549328649318549
31864A32864B33854A3282462E9A6854D4BDB3F8EDE6F0D6C0E6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADEC0AAF6EBE3EADFD9CCB4ABBFA196BEA095BEA094BEA094BFA094BEA0
94BFA095BFA195BDA095BC9D92C9B0A6E8DEDAFAF2ECF0D6C0E6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C89A79DAB9A2F1E1D6F6EDE7F1E8E3EFE6E2EFE7E2F0E8E2F1E8E2F1E8E2F1E8
E2F1E8E3F1E9E3F0E8E3F1E8E3F3EBE6F8F2EFF7EDE3EED1BAE6BD9AE6BD99E8
C09DE9C09BECC7A5F3DECAFAF4EDF6EFEAE2CABAC59676C08B68C3916FC49270
C69674D0A689DCBBA4E1C5B0E3C8B4E3CAB7E4CBB8E6CCB8E7CDB9E7CFBAE9CF
BBE9D0BCEAD1BDEBD2BFECD3C0EDD4C0ECD5C1EBD0B9E8C3A5E5BB97E5BC97E7
BE9AE8BD98EAC4A2F2DCC8FAF3ECF7F0ECE4CFC0CAA083C69676C99C7DCA9D7E
CB9F81CEA384D0A687D2A88AD3AA8CD3AB8DD5AD8FD7AE90D9B092DAB294DBB3
94DCB596DEB798DFB89AE1BA9CE2BC9CE3BE9FE4BFA0E6C0A0E7C1A0E8C3A2E9
C4A3E9C3A1EBC8A9F2DFCCFAF4EDFAF6F2F1E4DBE4CDBCE1C7B5E3CAB9E4CBB9
E4CCBBE5CCBAE4CBB8E5CCB9E6CDBAE6CDBBE7CEBCE8CFBDE9D0BEE9D1BFEAD2
BFEBD3C0ECD4C1ECD5C2EDD6C3EED7C3EED8C4EFD9C6F0DBC8F2DDCAF2DECBF3
DECCF2DDCAF3E0CFF8ECE1FBF7F3FCF9F7FAF4EEF6EBE4F4E9E1F5EBE3F6EBE2
F6EBE3F6ECE3F6ECE4F6ECE5F6ECE5F7ECE5F7EDE5F7ECE5F7ECE6F7EDE6F8ED
E6F8EEE6F8EFE6F8EFE7F8EFE7F8EFE7F8F0E7F9F0E7F9F0E8F9F0E8F9F0E8F9
F0E8F8EFE7FAF1E9FBF5F1FCFAF7000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000280000001000000020000000010018000000
00004003000000000000000000000000000000000000FCFAFAF2E8E1F2E7E1F2
E9E1F3E9E2F4EAE3F4EBE4F5ECE4F6ECE5F7EDE6F7EEE8FAF3EEF9F0E9F9F1E9
FAF2EBFDFBF8F8F2EDCCA386CA9D7ECCA182D3AC8FD6AF92D8B295D8AF8FDBB2
93DEB696E1BA99E4BE9EE7C1A1EAC5A4EECDAEFAF2EBF8F2EDC89B7CC69675CD
A182F3E7DDECDED5F5E8DFD9AF90D9AD8BDCB18EDFB592E2B996E5BD9AE9C19D
EDC8A7FAF2EAF8F2EDC89B7CC69675CDA182ECDDD495624CEADED7D9B091D9AD
8BDCB18EDFB592E2B996E5BD9AE9C19DEDC8A7FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A5139EADED7D9B091D9AD8BDCB18EDFB592E2B996E5BD9AE9C19D
ECC8A7FAF2EAF8F2EDC89B7CC69675CDA182ECDDD48A5039EADED7D9AF90D9AD
8BDCB18EDFB592E2B996E5BD9AE8C09DEBC7A5FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A5039EADED7DBB699DBB393DEB697E1BA9AE2B996E5BD9AE8C09D
EAC5A4FAF2EAF8F2EDC89B7CC69675CDA182ECDDD48A5039E2D4CEEADED7EADE
D7EBDFD8F8EFE7E5BF9FE5BD9AE8C09DEAC6A5FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD47F40278A503A8A513A8A513996624CEFE1D8E7C1A1E6BD9AE9C19D
ECC8A7FAF2EBF8F2EDC89B7CC69675CDA182ECDED58A5039E2D4CEEFE4DEEEE0
D7EEDFD6F7ECE2E8C3A2E6BD9AE9C19DEDC9A8FCF6F0F8F2EDC89B7CC69675CD
A183EDE1DA8A513AEADED7DFBDA3DEB99CE1BC9FE3BFA2E4BE9EE5BD9AE9C19D
EDC8A7FAF2EBF8F2EDC89B7CC69675CDA182ECDED58A5039E2D4CDEDDFD6EDDF
D6EEE0D6EEE0D7F8ECE3E8C2A1E9C19DEDC8A7FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A50398A503A8B513A8B513A8B533C97634EEFE1D9E8C2A1E9C19D
EDC8A7FAF2EAF8F2EDC89B7CC69675CDA182F3E6DDE9DDD6E9DDD7EADED7EADE
D8EADFD9EBE0DAF9F0E8E8C2A2E9C19DECC8A7FAF2EAF8F2EDCCA387CA9E7FCD
A182D4AC8FD6AF93D8B296DBB599DEB99CE1BC9FE3BFA2E6C3A6E7C1A1EAC5A4
ECCBACFAF2EBFDFBF9F7EDE6F7EDE5F7EDE6F7EEE7F7EEE7F8EEE8F8EFE8F8F0
E8F9F0E9F9F1E9F9F1E9FAF1EAFAF2EAFAF2EBFDFBF800000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000}
OldCreateOrder = False
Position = poDefaultPosOnly
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Bevel1: TBevel
Left = 7
Top = 10
Width = 178
Height = 224
Shape = bsFrame
end
end
===========================================
===========================================
No Titlebar Form in a form
===========================================
===========================================
Project1.dpr
program Project1;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit2 in 'Unit2.pas' {Form2};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm2, Form2);
Application.Run;
end.
===========================================
Unit1.pas
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
btnShowFrm2: TButton;
btnHideForm2: TButton;
Bevel1: TBevel;
Bevel2: TBevel;
procedure FormActivate(Sender: TObject);
procedure FormDeactivate(Sender: TObject);
procedure btnShowFrm2Click(Sender: TObject);
procedure btnHideForm2Click(Sender: TObject);
protected
procedure WMNCLButtonDown(var Msg: TWMNCLButtonDown); message WM_NCLBUTTONDOWN;
procedure BroadCastDeactivate;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses
unit2;
{$R *.dfm}
procedure TForm1.BroadCastDeactivate;
var
tmpMessage: TMessage;
begin
with tmpMessage do
begin
Msg := WM_NCACTIVATE;
WParam := Integer(False);
LParam := 0;
end;
Self.BroadCast(tmpMessage);
end;
procedure TForm1.WMNCLButtonDown(var Msg: TWMNCLButtonDown);
begin
inherited;
BroadCastDeactivate;
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
BroadCastDeactivate;
end;
procedure TForm1.FormDeactivate(Sender: TObject);
begin
BroadCastDeactivate;
end;
procedure TForm1.btnShowFrm2Click(Sender: TObject);
begin
Form2.Show;
end;
procedure TForm1.btnHideForm2Click(Sender: TObject);
begin
Form2.Hide;
end;
end.
===========================================
Unit1.dfm
object Form1: TForm1
Left = 198
Top = 202
Width = 322
Height = 282
HorzScrollBar.Visible = False
VertScrollBar.Visible = False
Caption = 'Form1 - See the included Readme.txt'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Icon.Data = {
0000010002002020000001001800A80C00002600000010100000010018006803
0000CE0C00002800000020000000400000000100180000000000800C00000000
0000000000000000000000000000FBF9F9F7F3F0F3EBE5F3E9E3F3EBE4F4EBE5
F4EBE5F4ECE5F4ECE5F5ECE6F5ECE6F4EDE7F4ECE7F5EDE8F6EDE7F7EFE8F6EF
E8F7EEE9F7EEE8F7EFE9F7EFE9F8F1EBFAF4F0FAF6F1F9F3EEF9F1ECF8F2EBFA
F3ECFAF3ECFBF4EDFCF7F3FCFAF8F9F5F2EEE1D9DFC6B5DDC0ADDEC4B1E0C5B3
E0C6B4E0C6B3E0C5B2E1C6B2E2C7B4E2C8B5E3C9B6E5CBB8E6CDBAE8CFBDE8D0
BDE9D0BEEAD1BFEBD3C0ECD4C1EDD6C3EED8C6EFDAC8EFDAC7F0DAC7F0DBC7F2
DCC9F2DCC8F4E0CDF8ECE1FCF7F3F7F0ECE4CFC0CAA083C59676C89B7CCA9D7E
CB9F80CEA284CFA687D2A88AD2AA8BD3AB8DD5AC8FD6AD8ED7AE8ED8AF8FDAB0
90DBB292DDB394DEB596E0B797E1B999E2BB9BE3BD9DE5BF9EE7C1A0E8C3A2EA
C4A4EBC4A2EECBABF4E0CEFBF4EDF6EFEAE2CABAC59677C08B68C3916FC49270
C69674D0A789DCBCA4E2C6B1E4C9B3E4C9B5E3C7B2DFBDA3D7AC8DD4A683D6A8
85D7AA87D9AC89DAAE8BDDB08DDEB28EDFB490E1B692E3B894E5BB96E6BD99E8
BF9BE9BF99ECC6A3F3DEC9FAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C89A79DAB9A2F1E1D6F7EEE7F4E9E1F5EBE4F7EDE6EEDACBDDB79BD5A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADEC0AAF6EBE3EADED7CEB5A9D4BFB6F1E8E4F2E4D9DEBAA0D5A785D6A9
87D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADFC1ABF4E8DFD0B8AC97644FA47968E1D2CDF2E4DADEBBA0D5A785D6A9
87D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DEC9ADA0854A33956350DCCCC6F2E5DBDEBCA1D5A886D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DECAAEA2894F38986754DDCDC7F2E5DBDEBCA1D5A886D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BECC7A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAEA38A4F38996754DECEC8F2E5DBDDBBA1D4A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BECC7A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAEA38A4F38996754DECEC8F2E5DBDDBBA1D4A885D7AA
88D9AD8BDBAF8DDCB18FDEB391DFB592E0B794E2B996E4BB98E6BD9AE7BF9CE9
C19DE9C09BEBC6A5F3DECAFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAFA38A5039996855DECEC8F1E4DADDB99FD4A682D6A8
85D8AB88DAAD8ADBAF8CDDB18EDEB38FDFB693E2B996E4BB98E6BD9AE7BF9CE8
C09CE8BF9AEAC5A4F2DDC9FAF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBAFA38A5039996855DECEC8F1E4DADDBAA0D4A783D6A9
86D8AC89DAAE8BDBB08DDDB28FDEB490DFB693E2B996E4BB98E6BD9AE7BF9CE8
C09CE7BF9AE9C5A3F2DDC9FAF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCAAEA28A4F38996855DFD0CAF7EEE7E8CFBCE1C1A7E2C2
AAE3C4ABE5C6ADE6C7AEE7C8AFE6C5AAE2BD9DE1B895E3BA97E6BD9AE7BF9CE7
BF9CE7BE9AE9C4A3F1DCC8F9F4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCAAEA28A4F38996753DFD0C9FBF9F6F5EDE7F2E8DFF3E8
DFF3E8DFF3E8E0F4EAE2F7ECE4F3E3D6E8CAB0E1B895E3B995E6BD9AE7BF9CE7
BF9CE7BE9AE9C4A3F1DCC8F9F4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCBB0A48A50398D553FC0A296D7C4BDD6C3BBD5C2BAD5C2
BAD4C0B9D4C0B8DDCDC7F2EBE8F9F1E9ECD1BAE2B996E3B995E6BD9AE7BF9CE8
C09DE8BF9BEAC5A4F2DDC9FAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF4E8DFCDB2A68A503978361D8A513B925D48925D48915C47915C
47905A468F5943A67B6ADCC9C1F8EEE5EED4BCE4BB98E4BA96E6BD9AE7BF9CE8
C09DE9C09BECC7A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C1ABF3E7DECDB2A68A503977351B874D368F59439059448F58438E58
418D553F8C543CA47764DAC6BDF8EDE3F0D4BCE6BD9AE5BB97E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4DFCBFBF4EEF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C1ABF3E7DECBB0A48A50398B533DBD9D90D4C0B8D6C2BAD5C1B9D4BE
B4D3BBB0D2BAAFDCC8BFF0E6E1F8EEE5EFD3BBE6BE9BE5BB97E6BD9AE7BF9CE9
C19EEAC19CEDC8A6F4E0CEFCF7F3F7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ACF4E8E0CBAFA48A5039986753DECFC8FCFAF8FAF3EDF7EDE5F6EA
E1F5E9DEF6E9DEF6EADFF6EAE0F3E1D2EBCCB1E5BD9AE5BB97E6BC99E7BF9CE9
C19EEAC19CEDC8A6F4E0CEFCF7F3F7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C3AEF5EBE4CBB1A78A5039996855E0D1CBF8F0E9EAD2C0E3C4ABE4C4
ABE5C5ACE7C7ADE7C7AEE7C7ADE5C4A8E3BD9CE2B995E4BA96E6BC99E7BF9CE9
C19EEAC19CEDC8A6F4DFCCFBF5EFF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C3AFF5ECE5CBB2A88A5039996855DECFC9F4E9E1E3C6B0DCB697DDB7
9ADFBA9CE1BB9EE2BDA0E3BFA2E4C0A2E4C2A4E5C1A2E5BE9DE6BD9AE6BE9BE9
C19EEAC19CEDC8A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ADF4E9E1CBB0A58A5039996855E1D2CDFDF9F5F5E8DCF2DFCFF3E0
D1F3E1D2F4E2D2F4E3D4F5E4D5F5E3D5F3E3D5F0DBC9EAC9AEE6BD9AE6BD9AE9
C19EEAC19CEDC8A5F3DECAFAF3ECF7F0EBE3CCBCC79A7BC28F6DC59574C59472
C99B7AE0C2ACF4E8DFCBAFA3894F38915C47CDB6ACE8DDD7E8DBD4E8D9D0E8D9
D0E8DAD0E8DAD1E8DAD1E8D9D1ECDED8F5EEE9F7EDE4EED2BBE6BD9AE6BD99E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C99B7AE0C2ACF3E7DECBAFA3864A3379381F95634EA37664A37663A47663A376
63A47663A47764A37663A17360B38C7DDECDC5F8EEE6F0D5BFE6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADFC1ABF4E8DFD3BBB196634F7F412982472F8549328549328649318549
31864A32864B33854A3282462E9A6854D4BDB3F8EDE6F0D6C0E6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C49372
C99B7ADEC0AAF6EBE3EADFD9CCB4ABBFA196BEA095BEA094BEA094BFA094BEA0
94BFA095BFA195BDA095BC9D92C9B0A6E8DEDAFAF2ECF0D6C0E6BE9BE5BC98E9
C19EEAC19CEDC8A6F4DFCBFBF4EDF7F0EBE3CCBCC79A7BC28F6DC59574C59473
C89A79DAB9A2F1E1D6F6EDE7F1E8E3EFE6E2EFE7E2F0E8E2F1E8E2F1E8E2F1E8
E2F1E8E3F1E9E3F0E8E3F1E8E3F3EBE6F8F2EFF7EDE3EED1BAE6BD9AE6BD99E8
C09DE9C09BECC7A5F3DECAFAF4EDF6EFEAE2CABAC59676C08B68C3916FC49270
C69674D0A689DCBBA4E1C5B0E3C8B4E3CAB7E4CBB8E6CCB8E7CDB9E7CFBAE9CF
BBE9D0BCEAD1BDEBD2BFECD3C0EDD4C0ECD5C1EBD0B9E8C3A5E5BB97E5BC97E7
BE9AE8BD98EAC4A2F2DCC8FAF3ECF7F0ECE4CFC0CAA083C69676C99C7DCA9D7E
CB9F81CEA384D0A687D2A88AD3AA8CD3AB8DD5AD8FD7AE90D9B092DAB294DBB3
94DCB596DEB798DFB89AE1BA9CE2BC9CE3BE9FE4BFA0E6C0A0E7C1A0E8C3A2E9
C4A3E9C3A1EBC8A9F2DFCCFAF4EDFAF6F2F1E4DBE4CDBCE1C7B5E3CAB9E4CBB9
E4CCBBE5CCBAE4CBB8E5CCB9E6CDBAE6CDBBE7CEBCE8CFBDE9D0BEE9D1BFEAD2
BFEBD3C0ECD4C1ECD5C2EDD6C3EED7C3EED8C4EFD9C6F0DBC8F2DDCAF2DECBF3
DECCF2DDCAF3E0CFF8ECE1FBF7F3FCF9F7FAF4EEF6EBE4F4E9E1F5EBE3F6EBE2
F6EBE3F6ECE3F6ECE4F6ECE5F6ECE5F7ECE5F7EDE5F7ECE5F7ECE6F7EDE6F8ED
E6F8EEE6F8EFE6F8EFE7F8EFE7F8EFE7F8F0E7F9F0E7F9F0E8F9F0E8F9F0E8F9
F0E8F8EFE7FAF1E9FBF5F1FCFAF7000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000280000001000000020000000010018000000
00004003000000000000000000000000000000000000FCFAFAF2E8E1F2E7E1F2
E9E1F3E9E2F4EAE3F4EBE4F5ECE4F6ECE5F7EDE6F7EEE8FAF3EEF9F0E9F9F1E9
FAF2EBFDFBF8F8F2EDCCA386CA9D7ECCA182D3AC8FD6AF92D8B295D8AF8FDBB2
93DEB696E1BA99E4BE9EE7C1A1EAC5A4EECDAEFAF2EBF8F2EDC89B7CC69675CD
A182F3E7DDECDED5F5E8DFD9AF90D9AD8BDCB18EDFB592E2B996E5BD9AE9C19D
EDC8A7FAF2EAF8F2EDC89B7CC69675CDA182ECDDD495624CEADED7D9B091D9AD
8BDCB18EDFB592E2B996E5BD9AE9C19DEDC8A7FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A5139EADED7D9B091D9AD8BDCB18EDFB592E2B996E5BD9AE9C19D
ECC8A7FAF2EAF8F2EDC89B7CC69675CDA182ECDDD48A5039EADED7D9AF90D9AD
8BDCB18EDFB592E2B996E5BD9AE8C09DEBC7A5FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A5039EADED7DBB699DBB393DEB697E1BA9AE2B996E5BD9AE8C09D
EAC5A4FAF2EAF8F2EDC89B7CC69675CDA182ECDDD48A5039E2D4CEEADED7EADE
D7EBDFD8F8EFE7E5BF9FE5BD9AE8C09DEAC6A5FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD47F40278A503A8A513A8A513996624CEFE1D8E7C1A1E6BD9AE9C19D
ECC8A7FAF2EBF8F2EDC89B7CC69675CDA182ECDED58A5039E2D4CEEFE4DEEEE0
D7EEDFD6F7ECE2E8C3A2E6BD9AE9C19DEDC9A8FCF6F0F8F2EDC89B7CC69675CD
A183EDE1DA8A513AEADED7DFBDA3DEB99CE1BC9FE3BFA2E4BE9EE5BD9AE9C19D
EDC8A7FAF2EBF8F2EDC89B7CC69675CDA182ECDED58A5039E2D4CDEDDFD6EDDF
D6EEE0D6EEE0D7F8ECE3E8C2A1E9C19DEDC8A7FAF2EAF8F2EDC89B7CC69675CD
A182ECDDD48A50398A503A8B513A8B513A8B533C97634EEFE1D9E8C2A1E9C19D
EDC8A7FAF2EAF8F2EDC89B7CC69675CDA182F3E6DDE9DDD6E9DDD7EADED7EADE
D8EADFD9EBE0DAF9F0E8E8C2A2E9C19DECC8A7FAF2EAF8F2EDCCA387CA9E7FCD
A182D4AC8FD6AF93D8B296DBB599DEB99CE1BC9FE3BFA2E6C3A6E7C1A1EAC5A4
ECCBACFAF2EBFDFBF9F7EDE6F7EDE5F7EDE6F7EEE7F7EEE7F8EEE8F8EFE8F8F0
E8F9F0E9F9F1E9F9F1E9FAF1EAFAF2EAFAF2EBFDFBF800000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000}
OldCreateOrder = False
OnActivate = FormActivate
OnDeactivate = FormDeactivate
PixelsPerInch = 96
TextHeight = 13
object Bevel1: TBevel
Left = 0
Top = 0
Width = 192
Height = 240
end
object Bevel2: TBevel
Left = 208
Top = 0
Width = 100
Height = 80
Shape = bsFrame
end
object BtnShowFrm2: TButton
Tag = 1
Left = 210
Top = 2
Width = 96
Height = 38
Cursor = crHandPoint
Caption = 'Show Form'
TabOrder = 0
OnClick = BtnShowFrm2Click
end
object btnHideForm2: TButton
Left = 210
Top = 40
Width = 96
Height = 38
Cursor = crHandPoint
Caption = 'Hide Form'
TabOrder = 1
OnClick = btnHideForm2Click
end
end
===========================================
Unit2.pas
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls;
type
TForm2 = class(TForm)
Bevel1: TBevel;
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure WMNCLButtonDown(var Msg: TWMNCLButtonDown); message WM_NCLBUTTONDOWN;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do
begin
WndParent := Application.MainForm.Handle;
Style := (Style or WS_CHILD) and not (WS_POPUP);
end;
Parent := Application.MainForm;
end;
procedure TForm2.WMNCLButtonDown(var Msg: TWMNCLButtonDown);
begin
inherited;
PostMessage(Self.Handle, WM_NCACTIVATE, integer(true), 0);
end;
end.
===========================================
Unit2.dfm
object Form2: TForm2
Left = 277
Top = 347
HorzScrollBar.Visible = False
VertScrollBar.Visible = False
BorderStyle = bsNone
Caption = 'Form2'
ClientHeight = 245
ClientWidth = 192
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poDefaultPosOnly
PixelsPerInch = 96
TextHeight = 13
object Bevel1: TBevel
Left = 0
Top = 0
Width = 192
Height = 240
Shape = bsFrame
end
end
===========================================
===========================================
End
===========================================
===========================================
Notes
The necessary .Res and .Dcr files are binary and included in the archive
............................................
Borderstyles
............................................
Note that borderstyle bsDialog presents you with only a close icon normally but if you use that in the Form-in-a-form, it has no effect in the Not_Moveable_Resizeable version, it will show up but will not be clickable. Same counts for bsResizeable, the icons will show up but will not be clickable. You will have to experiment what normal settings do with a form-in-a-form
............................................
Moveable and Resizeable Form-in-a-form
............................................
While the code in Unit2.pas makes sure you can move and resize the form you should also note that the BorderStyle of the form2 is set to bsSingle. Since setting this to bsSizeable does not result in the form2 being moveable and or resizeable, it only gives you the resize cursor when you hover over each of the 4 sides of the form itself, which serves no purpose to me. Also, the Captionbuttons [border icons] were removed, and the position was set to poDefaultPosOnly, plus the scrollbars were removed, these were the settings that differ from the defaults, change it the way you wish.
............................................
Not Moveable and Resizeable Form-in-a-form
............................................
While the code in Unit2.pas makes sure you cannot move and resize the form you should also note that the BorderStyle of the form2 is set to bsSingle. Since setting this to bsSizeable does not result in the form2 being moveable and or resizeable, it only gives you the resize cursor when you hover over each of the 4 sides of the form itself, which serves no purpose to me. Also, the Captionbuttons [border icons] were removed, and the position was set to poDefaultPosOnly, plus the scrollbars were removed, these were the settings that differ from the defaults, change it the way you wish.
............................................
No Titlebar Form-in-a-form
............................................
The borderstyle of Form2 was set to bsNone, and the position
was set to poDefaultPosOnly. A bevel was added to the form2
but this was to make it appear and also it looks nice to me.
............................................
Template_Mainform
............................................
Just a quick and easy starting point should you wanna create a Form-in-a-form
.
Kind Regards
Frank de Hell