此代码为vb.net中的计算大小,出了什么问题 [英] this code to calculated size in vb.net and what is wrong

查看:75
本文介绍了此代码为vb.net中的计算大小,出了什么问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

X=0
For i = 0 To TextBoxLength – 1
X=x+1
If ( TextBox1.Text(i) =" " ) then 

TextBox1 = TextBox1.Replace(" ", (20-x))      

Next i


此代码用于通过vb.net2010给出文本中的大小项????


this code use to give size term in text by vb.net2010?????

推荐答案

以下是您的代码,我仅被修改....

Following is your code , I am Modified only ....

D
       im X As Integer = 0
      Dim i As Integer
      Dim TextBoxLength As Integer = 0

      TextBoxLength = TextBox1.Text.Length

      For i = 0 To TextBoxLength - 1
          X = X + 1
          If TextBox1.Text.Substring(i) = " " Then
              TextBox1.Text = TextBox1.Text.Replace(" ", (20 - X))
          End If

      Next i


请说明以下内容
1. TextBox1.Text.Replace(",(20-X))?和20-x?
2.您想做什么?


Please explain following things
1. TextBox1.Text.Replace(" ", (20 - X))? and 20 - x ?
2. What do you want to do exactly ?


这篇关于此代码为vb.net中的计算大小,出了什么问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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