Initially, Label1.Caption equates to zero. Here is the source code:
procedure TForm1.FormMouseWheelDown(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean); begin Label1.Caption:=IntToStr(StrToInt(Label1.Caption)+1); end; procedure TForm1.FormMouseWheelUp(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean); begin Label1.Caption:=IntToStr(StrToInt(Label1.Caption)-1); end; My task is to catch how many times the action was performed by scrolling "Up" and "Down" and start the corresponding function. Is the source running, but why does it run twice ??? And how to make it run once?