Announcement

Collapse
No announcement yet.

WheelMouse

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • WheelMouse

    Wenn ich in der DBLookupCombox mit dem Rad der WheelMouse scrolle, so verabschiedet sich das Programm. Dieser Fehler ist bei verschiedenen Betriebssysteme, Computer und Mäuse aufgetreten.
    Weiß jemand woran das liegt.

    Vielen Dank
    Hermann

  • #2
    <br>Hi,...
    <br>
    <br>ich habe irgend wo schon mal was darüber gelesen (ggf. hier im Forum). Ich glaube das ist ein BUG. Wenn du in Delphi 5 unter Hilfe - Info gehst und da eine Compilierung < 6.18 steht dann Versuch mal ein Update.
    <br>
    <br>MfG
    <br>P

    Comment


    • #3
      Hallo,

      Borland hat am 28.09.1999 einen <b>Delphi Tech Allert</b> zu diesem Problem als eMail verschickt:

      Product: Delphi <br>
      Version: 5.0 <br>
      Description: Conflict between latest InteliMouse
      driver and TDBLookupComboBox.<br>
      Severity: Serious/Highly Visible

      <b>Steps to Reproduce:</b><br>
      Install InteliMouse Driver v2.2d.
      Create or open an application which uses a
      TDBLookupComboBox. Click on the arrow in the
      box to show the drop down list. Now move the
      mouse wheel, and the application freezes.
      The application must be killed to recover.
      This issue does not occur with a TComboBox
      (TDBLookupComboBox is not a TComboBox descendent).

      <b>Workaround</b>:<br>
      A permanent solution to this issue is currently
      in development. Here is a workaround which
      requires adding a couple lines to DBCTRLS.PAS:
      <pre>
      { This part takes care of the AV. ListLink.DataSet
      could be nil after the WM_MOUSEWHEEL wasn't
      handled and the Intellimouse driver decided to
      send a WM_VSCROLL }
      procedure TDBLookupListBox.WMVScroll(var Message: TWMVScroll);
      begin
      SearchText := '';
      <<<< ADD >>>>
      if ListLink.DataSet = nil then Exit;
      <<<< END ADD >>>>
      with Message, ListLink.DataSet do
      case ScrollCode of
      SB_LINEUP: MoveBy(-FRecordIndex - 1);
      SB_LINEDOWN: MoveBy(FRecordCount - FRecordIndex);
      SB_PAGEUP: MoveBy(-FRecordIndex - FRecordCount+ 1);
      SB_PAGEDOWN: MoveBy(FRecordCount - FRecordIndex+ FRecordCount - 2);
      SB_THUMBPOSITION:
      begin
      case Pos of
      0: First;
      1: MoveBy(-FRecordIndex - FRecordCount + 1);
      2: Exit;
      3: MoveBy(FRecordCount - FRecordIndex + FRecordCount - 2);
      4: Last;
      end;
      end;
      SB_BOTTOM: Last;
      SB_TOP: First;
      end;
      end;
      { This takes care of the "hang". For some unknown
      reason, the control gets a WM_KILLFOCUS immediately
      after the *second* WM_MOUSEWHEEL. I wasn't able to
      determine where the message came from. However,
      focus is retained by the drop-down list, making it
      appear that the application had stopped responding }
      procedure TDBLookupComboBox.CloseUp(Accept: Boolean);
      var
      Msg: TMsg;
      ListValue: Variant;
      begin
      if FListVisible then
      begin
      if GetCapture <> 0 then SendMessage(GetCapture,WM_CANCELMODE, 0, 0);
      <<<< ADD >>>>
      SetFocus;
      <<<< END ADD >>>>
      ListValue := FDataList.KeyValue;
      SetWindowPos(FDataList.Handle, 0, 0, 0, 0, 0, SWP_NOZORDERor
      SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATEor SWP_HIDEWINDOW);
      FListVisible := False;
      FDataList.ListSource := nil;
      Invalidate;
      SearchText := '';
      if Accept and CanModify then SelectKeyValue(ListValue);
      if Assigned(FOnCloseUp) then FOnCloseUp(Self);
      end;
      end;
      </pre>
      Mit der Installation des <b>UpdatePack#1</b> zu Delphi 5 sollte das Problem aus der Welt sein.
      &#10

      Comment

      Working...
      X