Hai kurtm1,
was häst Du denn von diesem Lösungsansatz?:
Delphi-Quellcode:
procedure TForm1.FormMouseWheel(Sender: TObject; Shift: TShiftState;
WheelDelta: integer; MousePos: TPoint; var Handled: boolean);
const
DeltaDiv = 20;
var
ControlOnMouse: TControl;
begin
ControlOnMouse := ControlAtPos(ScreenToClient(MousePos), False, True);
if (ControlOnMouse is TScrollBar) then // Für alle Scrollbars
begin
with (ControlOnMouse as TScrollBar) do
begin
Position := Position - (WheelDelta div DeltaDiv);
end;
end;
if (ControlOnMouse = Label1) then // Nur für Label1
begin
with (ControlOnMouse as TLabel) do
begin
Label1.Caption := IntToStr(StrToInt(Label1.Caption) + WheelDelta);
end;
end;
end;
Stephan B.
"Lasst den Gänsen ihre Füßchen"