First drop a combobox control in the form and name it. Go to the code and declare a boolean variable and set it to false:
Public Class Form1 Dim editingInCombobox As Boolean = False
then create keypress event in the combobox control (creating event in vbnet code window).
Once you done, add the following line of codes in the keypress block:
If Not editingInCombobox Then e.Handled = True Beep()
editingInCombobox = is the boolean variable we declared
Beep ( ) = Sounds a tone through the computer's speaker.
That's it, I hope you like it.
15 That ye may be blameless and harmless, the sons of God, without rebuke, in the midst of a crooked and perverse nation, among whom ye shine as lights in the world;
Philipians 2:15 KJV
Praise to LORD JESUS CHRIST
I have new, simply type, ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList
ReplyDeleteSome vb codes new in http://joysources.info
ReplyDelete