gpt4 book ai didi

vb6 - 用vb6连接字符串

转载 作者:行者123 更新时间:2023-12-05 08:35:07 28 4
gpt4 key购买 nike

我正在尝试在 vb6 中连接。不支持运算符 +=,我想执行类似下面代码的操作。我想在程序处理这段代码时向文本框添加更多字符串。谁能建议将 += 更改为什么?我知道 & 可以在将一个字符串添加到另一个字符串时使用,但它似乎不适合我在这里处理的示例。

谢谢。

    If (strHomeNo <> "") Then
txtPhoneNums = "Home: " + strHomeNo
End If
If (strMobileNo <> "") Then
txtPhoneNums += "Mobile: " + strMobileNo
End If
If (strWorkNo <> "") Then
txtPhoneNums += "Work: " + strWorkNo
End If
If (txtPhoneNums <> "") Then
txtPhoneNums.ForeColor = vbBlack
txtPhoneNums.FontBold = False
End If
Else
txtPhoneNums.Text = "NO CONTACT DETAILS"
txtPhoneNums.ForeColor = vbRed
txtPhoneNums.FontBold = True

最佳答案

会:

txtPhoneNums = txtPhoneNums & "Work: " & strWorkNo

不工作?

关于vb6 - 用vb6连接字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10688602/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com