简体   繁体   English

如何才能直接从代码中搜索 label 中的 VB.net 中的单词?

[英]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.在 ClearlyClueless 先生的帮助下尝试这些代码后,我仍然无法弄清楚如何在单击按钮 3 时更改 combobox。我尝试了按钮 3 中的代码,但它不起作用。

the combobox has items 0,1,2,3 combobox 有项目 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.我点击按钮 3,它会显示 msgbox"your message",因为代码上的单词与 label 中的单词匹配。但它不起作用。 Because if it worked, then I can now change the msgbox a combobox1.selectedindex = 0因为如果它有效,那么我现在可以将 msgbox 更改为 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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