-
January 1st, 2021, 03:19 PM
#1
[RESOLVED] Get the SelectedIndexChanged events of a combobox to fire Visual Studio 2012
Hello again.
Same project as in a previous post: https://forums.codeguru.com/showthre...al-Studio-2012
If the user manually types in a value (letter A-Z) I want the SelectedIndexChanged event of that combo box to fire.
Based upon the value in the combo box, a label changes it's text value:
Code:
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
If ConfigSet = True Then Exit Sub
If Rnd_Letters.Checked = False Then CalcNumLetters()
Check_Defaults()
OKToolStripMenuItem.Enabled = True
SAVEToolStripMenuItem.Enabled = True
End Sub
Private Sub CalcNumLetters()
Select Case True
Case ComboBox1.Text > ComboBox2.Text
Label10.Text = "Backward"
TextBox1.Text = Str(Math.Abs(Asc(ComboBox1.Text) - Asc(ComboBox2.Text)) + 1)
Case ComboBox2.Text > ComboBox1.Text
Label10.Text = "Foreword"
TextBox1.Text = Str(Math.Abs(Asc(ComboBox2.Text) - Asc(ComboBox1.Text)) + 1)
End Select
TextBox1.Enabled = False
End Sub
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|