单词进入数组 [英] word into array

查看:58
本文介绍了单词进入数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




如果我想获得


" word"


进入


" w"

" o"

" r"

d


in vb6


提前致谢。

Hi,

How if i want to get

"word"

into

"w"
"o"
"r"
"d"

in vb6

Thanks in advance.

推荐答案

您好vbbb,

这是我最好的帮助。在此示例中,您将添加一个名为Text1的TextBox,一个名为List1的ListBox和名为Command1的Command Button,然后在代码部分中复制并粘贴我的下面的代码。然后只留下你的东西就是运行它并单击命令按钮。

Hi vbbb,
Here is my best help. In this example you add one TextBox named Text1, one ListBox named List1 and Command Button named Command1 then in the code section copy and paste my below code. Then only thing left for you is to run it and click Command button.


Private Sub Command1_Click()

Dim i作为整数


对于i = 1到Len(Text1.Text)


使用List1

.AddItem Mid (Text1.Text,i,1)

结束

下一页我

结束子
Private Sub Command1_Click()
Dim i As Integer

For i = 1 To Len(Text1.Text)

With List1
.AddItem Mid(Text1.Text, i, 1)
End With
Next i
End Sub



希望这有帮助

Hope this helps


谢谢KinWang的帮助。
Thank you KinWang for your help.


Dim strWord As String

Dim我作为整数


strWord =" word"


for i = 1 to Len(strWord)

打印Asc(中(strWord,i,1))

下一页我


非常简单的一步。 Tq KinWang。
Dim strWord As String
Dim i As Integer

strWord = "word"

For i = 1 To Len(strWord )
Print Asc(Mid(strWord , i, 1))
Next i

Very simple step. Tq KinWang.


这篇关于单词进入数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆