Autor Beitrag
DataCool
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 112



BeitragVerfasst: Mi 05.03.03 10:06 
Hi,

wie kann ich eine Form an eine andere andocken lassen ?
Wie in der Delphi IDE ? Das Delphi-Demo Docking habe ich mir schon angeschaut, bin aber nicht draus schlau geworden bzw. die Forms lassen sich dort auch nicht andocken.

Jemand ne Idee ?

_________________
DataCool
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Mi 05.03.03 15:23 
Eine Möglichkeit:
Damit Form1 von Form2 "mitgezogen" wird musst du die WndProc Prozedur umschreiben:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
    
{--}
public
procedure WndProc(var Message: TMessage); override;
{--}
implementation
procedure tmainform.WndProc(var Message: TMessage);
begin
 if (Message.msg = WM_Move) and (started) then
 begin
  Form2.left := Form1.left+Form1.width;
  Form2.top := Form1.top;
 end;
 inherited WndProc(Message);

Du musst den Code eben anpassen (die Position von Form2 wird ja in Abhängigkeit der von Form1 angegeben)

mfg
GSE

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)