我创建了一个在ToolStripDropDown中显示自身的自定义UserControl,以模拟ToolTip功能。2)当工具提示显示时,即使其中的ToolStripDropDown或我的UserControl都没有触发"GotFocus“事件,只要工具提示被显示,我仍然会失去键盘焦点,这也不是理想的工具提示行为。的代码:{
dropDown = new ToolStripDrop
host any System.Windows.Forms.Controlpublic class PopupWindow : System.Windows.Forms.ToolStripDropDown_host);}Public Class PopupWindow
Inherits System.Windows.Forms.ToolStripDropDown
public class CtlDropdownPopup : ToolStripDropDown ListBox controlToPop;this.LstCountry.Source(dtCountries, "Country", "Country_ID");
正如我所说的,ToolStripDropDown
我想禁用ToolStripDropDownButton下拉列表上的下拉阴影。如果下拉菜单包含具有下拉菜单本身的项目(例如多级菜单),则在ToolStripDropDownButton上将DropShadowEnabled设置为false会导致顶级下拉菜单出现在错误的位置。请参阅附件中的图片。public partial class Form1 : Form public Form1() InitializeComponent();
toolStripDropDownButton1.DropDown.DropShadowEnab