找到计算机名后的单词? [英] Find word after computer name?
本文介绍了找到计算机名后的单词?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿伙计们,所以我正在开展一个项目,我希望我的应用程序能够找到该人员计算机名称后面的单词。我不知道如何编辑我的代码以使其工作。
Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)处理Button1.Click
Dim str As String = TextBox1.Text $ .Replace(,vbNullString)
TextBox1.Text = TextBox2.Text $ .Substring(TextBox2.Text $。 IndexOf(str)+ Val(str.Length + 1))。Split()(0)
End Sub
我尝试过:
Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)处理Button1.Click
Dim str As String = TextBox1.Text $ .Replace(,vbNullString)
TextBox1.Text = TextBox2.Text $ .Substring(TextBox2.Text $ .IndexOf (str)+ Val(str.Length + 1))。分割()(0)
结束子
解决方案
< blockquote> .Replace(,vbNullString)
TextBox1.Text = TextBox2.Text
.Substring(TextBox2.Text
.IndexOf(str)+ Val(str.Length + 1))。Split()(0)
End Sub
我尝试过:
Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles Button1.Click
Dim str As String = TextBox1.Text
Hey guys, so I am working on a project, and I want my application to find the word after the person's computer name. I don't know how to edit my code to make this work.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim str As String = TextBox1.Text$.Replace(" ", vbNullString) TextBox1.Text = TextBox2.Text$.Substring(TextBox2.Text$.IndexOf(str) + Val(str.Length + 1)).Split(" ")(0) End Sub
What I have tried:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim str As String = TextBox1.Text$.Replace(" ", vbNullString) TextBox1.Text = TextBox2.Text$.Substring(TextBox2.Text$.IndexOf(str) + Val(str.Length + 1)).Split(" ")(0) End Sub
解决方案
.Replace(" ", vbNullString) TextBox1.Text = TextBox2.Text
.Substring(TextBox2.Text
.IndexOf(str) + Val(str.Length + 1)).Split(" ")(0) End Sub
What I have tried:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim str As String = TextBox1.Text
这篇关于找到计算机名后的单词?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文