程式碼:
using System.Linq;
using System.Windows.Forms;
namespace Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
//設定下拉時寬度
comboBox1.DropDownWidth = 200;
//設定下拉時選單高度
comboBox1.DropDownHeight = 500;
foreach (var n in Enumerable.Range(50999955, 5000).ToArray().AsParallel())
{
comboBox1.Items.Add(n);
}
comboBox1.SelectedIndex = 0;
}
}
}
加入前:
加入後:

