VB问题 字符串的显示

来源:百度知道 编辑:UC知道 时间:2024/05/26 09:48:20
想请高手帮我编一个小程序:
a=1
b=2
c=3
h=InputBox("请输入abc")
text1.text=h
文本框里面显示为***并且复制文本框里面的*** 可以复制出123
请高手帮忙``好了后+分

不能吧?
可以再加一个text2,text2设置成隐藏,text2.text=text1.text。
然后在text1后边加一个按钮,点击之后把text2.text复制到剪切板。
Text1.PasswordChar = "*" '让text1里显示为*******

Private Sub Command3_Click()
h = InputBox("asdf")
Text1.PasswordChar = "*"
Text1.Text = h
Clipboard.SetText Text1.Text
Debug.Print Clipboard.GetText
End Sub

Dim vbs As Object

Private Sub Command1_Click()
h = InputBox("asdf")
Text1.Text = h
s = Text1.Text
For i = 1 To Len(s) Step 2
s1 = s1 & Format(vbs.Eval(Mid(s, i, 2)), "00")
Next i
Text2.Text = s1
End Sub

Private Sub Form_Load()
Set vbs = CreateObject("ScriptControl")
vbs.Language = "vbs"
vbs.ExecuteStatement "A1 = 12"
vbs.ExecuteStatement "A2 = 13"
vbs.ExecuteStatement "A3 = 14"
End Sub