Why ComboBox hides cursor when DroppedDown is set?

后端 未结 5 1981
长发绾君心
长发绾君心 2020-12-07 00:23

Let\'s create WinForms Application (I have Visual Studio 2008 running on Windows Vista, but it seems that described situation takes place almost everywhere from Win98 to Vis

5条回答
  •  天命终不由人
    2020-12-07 01:00

    It's a strange set of circumstances where the combo box is a DropDownList type and you call the DroppedDown method on the combo box from within the code either while it has the focus or not.

    The cursor will disappear as though behind the form. If you click the form the cursor comes back but the combo box closes so not a good result.

    I can confirm that this code fixes the issue without closing the combo box list.

    cbo_VisitorTypes.DroppedDown = true;
    Cursor.Current = Cursors.Default;
    

提交回复
热议问题