【问题标题】:What is wrong with my 'selecting' code? (VB)我的“选择”代码有什么问题? (五)
【发布时间】:2011-12-23 14:40:05
【问题描述】:

我在VB中有以下代码:

If TextBox1.Text = (Label2.Select(0, 1) Then
            TextBox2.Focus()
        End If

但它不起作用:(

这是我的代码应该做的:

  • 如果texbox1中的文字与标签2的首字母相同
  • 然后将光标移动到textbox2

【问题讨论】:

  • 地铁?表格? WPF?银光? ASP.NET?单触?

标签: select text if-statement textbox focus


【解决方案1】:

你正在尝试写Label2.Text.Substring(0,1)

【讨论】:

    猜你喜欢
    • 2012-01-27
    • 2023-03-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-11
    • 1970-01-01
    • 2011-07-28
    相关资源
    最近更新 更多