我刚学VB,有没有人能帮我解释一下这段代码?

来源:百度知道 编辑:UC知道 时间:2024/06/07 06:14:49
解释要详细,我在后面打了个*的代码帮我解释一下它里面所有的函数及语句结构。
(代码开始)
private sub command1_click()
text2.text = ""*
dim i as integer*
dim temp as string*

for i = 1 to len(text1.text)*
temp = temp & "alt + " & AscW(mid(text1.text, i, 1)) + 65536 & " "*
text2.text = temp
next*
end sub
(代码完)

private sub command1_click()
text2.text = ""* ''''使text2文本框内的内容为空
dim i as integer* 定义i 为整型变量
dim temp as string* 定义 temp 为字符变量

for i = 1 to len(text1.text)* len是测试text1内容的长度
temp = temp & "alt + " & AscW(mid(text1.text, i, 1)) + 65536 & " "* 你哪里不明白?
text2.text = temp
next* 与for 是一个语句
end sub

大哥 你先看看书 再来提问好吗?
累死我了!!!