private void myAC_textChanged(object sender, EventArgs e) { GF.bringToFront(this); this.list = new Dictionary <int, string>(); if (myAC.acTxt.Text.Trim() != "") { doQuery(); } else { myAC.acBox.Items.Clear(); } myAC.acBox.DisplayMember = "Value"; myAC.acBox.Items.AddRange(list.OfType <object>().ToArray()); myAC.acBox.Refresh(); this.Height = myAC.Height; this.Width = myAC.Width; }