79759871

Date: 2025-09-09 12:21:40
Score: 0.5
Natty:
Report link
procedure TForm1.FormMouseWheel(Sender: TObject; Shift: TShiftState;
  WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
var
  LCB: TDBLookupComboBox;
begin
  if ActiveControl is TDBLookupComboBox then
  begin
    LCB := ActiveControl as TDBLookupComboBox;

    // هل القائمة مفتوحة؟
    if SendMessage(LCB.Handle, CB_GETDROPPEDSTATE, 0, 0) <> 0 then
    begin
      if WheelDelta > 0 then
        LCB.Perform(WM_KEYDOWN, VK_UP, 0)
      else
        LCB.Perform(WM_KEYDOWN, VK_DOWN, 0);

      Handled := True;
    end;
  end;
end;
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: HMZ