protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); var info = new NativeMethods.COMBOBOXINFO(); info.cbSize = Marshal.SizeOf(info); NativeMethods.GetComboBoxInfo(this.Handle, ref info); listBoxHelper = new NativeMethods.ListBoxHelper(info.hwndList); }
private void Control_HandleCreated(object sender, EventArgs e) { base.OnVisibleChanged(e); var info = new NativeMethods.COMBOBOXINFO(); info.cbSize = Marshal.SizeOf(info); NativeMethods.GetComboBoxInfo(this.Control.Handle, ref info); listBoxHelper = new NativeMethods.ListBoxHelper(info.hwndList); }