タイトル : Re^2: コンボボックスの項目移動について 投稿日 : 2004/06/15(Tue) 11:35 投稿者 : るしぇ
[OSのVer]:Windows2000 [VBのVer]:VB.NET2003 Private Sub ComboBox1_KeyPress(ByVal sender As Object, _ ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles ComboBox1.KeyPress 'If e.KeyChar = Chr(Keys.Enter) Then ' e.Handled = True ' TextBox1.Select() '次のコントロールへ 'End If End Sub Private Sub Form1_Load(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load ComboBox1.DropDownStyle = ComboBoxStyle.DropDown ComboBox1.Items.Add("あいうえお") ComboBox1.Items.Add("かきくけこ") End Sub 一応、これで再現できました(?)。 音からするとシステムの『一般の警告音』です。テキストボックスでリターンキー 押下でも鳴ります。ComboBoxStyle.DropDown にするとテキストボックスと同じような 動作をしますのでその辺が影響してるのかと。 対処方法は… e.Handled = True なハズなんですが…うむー。 |