Einzelnen Beitrag anzeigen

Benutzerbild von dahead
dahead

Registriert seit: 16. Mai 2005
620 Beiträge
 
#3

Re: Winampmässiges "EasyDrop"

  Alt 22. Jul 2005, 19:01
ist von '99, damals hab ich das so gemacht (der hinweis deshalb, da man das sicherlich optimieren kann, bzw. fehler drin sind/sein könnten):


Code:
procedure TForm1.Panel1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
 if ssleft in shift then
  begin
    ReleaseCapture;
    Form1.perform(WM_syscommand, $F012, 0);

    (Edit: das hier kannst du weglassen, nimm stattdessen wie blackjack sagt screensnap).
    if Form1.Left < 30 then Form1.Left := 0;
    if Form1.Top < 30 then Form1.Top := 0;
    if Form1.Left > Screen.Width - Form1.Width - 60 then Form1.Left := Screen.Width - Form1.Width;
    if Form1.Top > Screen.Height - Form1.Height - 60 then Form1.Top := Screen.Height - Form1.Height - 28;
    // - 25 wegen Taskleiste
  end;
end;
  Mit Zitat antworten Zitat