简体   繁体   中英

What to do to be able to search a word from label in VB.net directly from code?

在此处输入图像描述

These codes are working. After trying these codes with the help of sir ClearlyClueless, I still can't figure out how can I change the combobox when i click the button 3. I tries the code in button 3 and it doesn't work.

the combobox has items 0,1,2,3

II click the button 3, it will show msgbox"your message" since the word on the code is matching the word in the label. but it doesn't work. Because if it worked, then I can now change the msgbox a combobox1.selectedindex = 0

I figured out the solution.

This codes helped me.

If Label1.Text.ToUpper.Contains("wanna be A ".ToUpper) Then
        MsgBox("The code is working")
        ComboBox1.SelectedIndex = 2
    End If

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM