步骤如下:
创新互联专业为企业提供五莲网站建设、五莲做网站、五莲网站设计、五莲网站制作等企业网站建设、网页设计与制作、五莲企业网站模板建站服务,十载五莲做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。
窗体上添加2个列表框,一个按钮:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim MyDir As String = "C:\123"
'搜索并显示子文件夹
ListBox1.Items.Clear()
For Each MySubDir As String In System.IO.Directory.GetDirectories(MyDir)
ListBox1.Items.Add(MySubDir)
Next
'搜索并显示文件
ListBox2.Items.Clear()
For Each MyFile As String In System.IO.Directory.GetFiles(MyDir)
ListBox2.Items.Add(MyFile)
Next
End Sub
End Class
If TextBox1.Text.Contains("@") Then
MsgBox("已找到")
Else
MsgBox("未找到")
End If
dim str1 ,str2 as string
dim n as integer
str2=inputbox("请输入要查找的字符:")
for n=1 to len(textbox1.text)
str1=mid(textbox1.text,n,1)
if str2=str1 then
msgbox("找到啦!")
exit for
end if
next
if n=len(textbox1.text)+1 then
msgbox("没有你要找的字符!")
end if
文章标题:vb.net文本查找 vb查找方法
本文URL:https://www.cdcxhl.com/article12/dddpsgc.html
成都网站建设公司_创新互联,为您提供网站排名、用户体验、定制开发、静态网站、网站内链、网站制作
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联