Autor Beitrag
PhilGo
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 315

Win 98, Win Longhorn ;-)

BeitragVerfasst: So 14.09.03 17:34 
Grüßt euch,

man kann ja ein Programm per Titelleiste verschieben. So nun meine Frage: Wie kann ich mein Prog auf einer beliebigen Stelle verschieben?

Mfg PhilGo :?:


Moderiert von user profile icontommie-lie: Topic verschoben

_________________
Sie werden dich finden und töten... Söhne der großen Bärin!
G-McKree
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 178



BeitragVerfasst: So 14.09.03 17:45 
form1.left
form1.top
ErnestoChe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 528

Win 2000 pro, CRUX 2.0
Delphi 6 Pers, Open K3
BeitragVerfasst: So 14.09.03 18:31 
Hi,

folgenden Code in OnMouseMove-Ereignis der Form schreiben:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if (ssLeft in Shift) then
  begin
    ReleaseCapture;
    SendMessage(Self.Handle, WM_SYSCOMMAND, SC_MOVE + 1, 0);
  end;
end;


Wenn du die Form z.B. mit einem Panel verschieben willst, musst du natürlich den Code ins OnMouseMove des Panels schreiben.

MFG

- Ernesto -
PhilGo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 315

Win 98, Win Longhorn ;-)

BeitragVerfasst: Sa 20.09.03 14:34 
Vielen Dank für die Info und Quelltext. :D



Mfg PhilGo

_________________
Sie werden dich finden und töten... Söhne der großen Bärin!