当前位置:编程学习 > VB >>

textbox中的英吋符号

我要在textbox中输入英吋符号,用右双引号代替(即:"),但在程序中无法用,请问怎样解决?谢谢! chr(34)

text1.text=text1.text & "”"
Private Sub Command1_Click()
    Text1.Text = "haha: 35" & Chr(34)
End Sub
引用 2 楼 link0007 的回复:
VB code

text1.text=text1.text & "”"


可以这样
Private Sub Command1_Click()
    Text1.Text = "haha: 35" & """"
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 34 Then KeyAscii = Asc(":")
End Sub
"haha: 35"""
Text1.Text = "haha: 35"""
text1.text=text1.text & "”"
"”"用中文字符可以,用西文字符不行。还是用chr(34)好了。
补充:VB ,  API
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,