Einzelnen Beitrag anzeigen

Finki

Registriert seit: 2. Jul 2013
120 Beiträge
 
FreePascal / Lazarus
 
#3

AW: So lange Linke Maustaste gedrückt

  Alt 10. Aug 2013, 13:32
Zum Theam Endlosschleife, hab ich inzwischen geklärt, das problem war das die procedure FormMouseUp nicht zugewisen war

und zum thema mit der Maus bewegen, da ist das Problem, das mein Textfeld ziwschen zwei positionen hin und her springt ganz schnell
in zwischen sieht der Befehl so aus

Delphi-Quellcode:
procedure TForm3.FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
var
   meinControl: TWinControl;
begin
 MDown:=true;
  if move=true then begin
 if (Sender is TWinControl) then
 if (Sender<>Form3) then
 meinControl := (Sender as TWinControl)
 else
 Exit;
 while MDown=true do
   begin
   meinControl.Left:=((Mouse.CursorPos.x-Form3.Left)+(Mouse.CursorPos.x-(meinControl.Left+Form3.Left)));
   meinControl.Top:=((Mouse.CursorPos.y-Form3.Top)+(Mouse.CursorPos.y-(meinControl.Top+Form3.Top)));
   Form3.Refresh;
   Application.ProcessMessages;
   end;

  end
  else
  Exit;
end;
Wenn ich ein Label bewegen will kommt mein Programm hat einen External <<SIGSEGV>> ausgelöst in
include\control.inc in zeile 3953 irgendwas da steht drin

Delphi-Quellcode:
procedure TControl.SetLeft(Value: Integer);
begin
  {$IFDEF CHECK_POSITION}
  if CheckPosition(Self) then
  DebugLn('[TControl.SetLeft] ',Name,':',ClassName,' ',DbgS(Value));
  {$ENDIF}
  if csLoading in ComponentState then
  begin
    inc(FReadBounds.Right, Value - FReadBounds.Left);
    FReadBounds.Left := Value;
    Include(FControlFlags, cfLeftLoaded);
  end;
  SetBounds(Value, FTop, FWidth, FHeight);
end;
  Mit Zitat antworten Zitat