Autor Beitrag
delphiuserno1
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 82


Delphi 7 enterprise, Delphi 2007
BeitragVerfasst: Mo 05.09.05 13:28 
Hallo

Ich wollte wissen, wie ich die Form eines Programmes während der Laufzeit mit der Maus verschiebe d.h. wenn ich das Programm starte soll man mit gedrückter Maustaste auf irgendeinem bereich die Form verschieben können. Der BorderStyle der Form ist nämlich auf bsNone gestellt!
Ich hoffe jemand weiß wie man so was macht!
matze.de
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 576

Win95, Win98 SE, WinXp Prof SP2
D7P, D8P, FPC2.0
BeitragVerfasst: Mo 05.09.05 13:36 
Hier so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TForm1.MainPanelMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
const
  SC_DRAGMOVE = $F012;
begin
  if (ssLeft in Shift) then
  begin
    ReleaseCapture;
    Form1.Perform(WM_SYSCOMMAND, SC_DRAGMOVE, 0);
  end;
end;


mfg matze

_________________
si tacuisses, philosophus mansisses.
delphiuserno1 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 82


Delphi 7 enterprise, Delphi 2007
BeitragVerfasst: Mo 05.09.05 14:17 
Ja, DANKE!!!

Genau das habe ich gesucht!