Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
J

Jesi523

@Jesi523
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • My code will not capitalize first letter of line
    J Jesi523

    Thank you, I kind of thought that was the problem...but how do i fix that? I'm very new at vb.net. Thanks. Jesi

    Visual Basic question

  • My code will not capitalize first letter of line
    J Jesi523

    My input text from a .txt file is this is the first line this is the second line this is the third line I need to capitalize the first letter of each word by placing it in a textbox, I have the following code: Dim aString As String = My.Computer.FileSystem.ReadAllText("input.txt") Dim stringReturn As String If My.Computer.FileSystem.FileExists("input.txt") Then Me.xInputTextBox.Text = (Convert.ToString(aString.ToLower)) End If Do While (aString.IndexOf(Space(2)) >= 0) aString = aString.Replace(Space(2), Space(1)) Loop Dim caparray() As String = (aString.Split(" " & "ControlChars.NewLine")) For I As Integer = 0 To caparray.Length - 1 If caparray(I).Length = 1 Then caparray(I) = caparray(I).ToUpper Else ' ***join them back together caparray(I) = caparray(I).Substring(0, 1).ToUpper & caparray(I).Substring(1).ToLower End If Next stringReturn = String.Join(" ", caparray) Me.xInputTextBox.Text = (stringReturn.ToString) My output is then This Is The First Line this Is The Second Line this Is The Third Line It will not capitalize the first letter of the second and third line. Can someone please tell me what I am doing wrong? Thanks, Jesi

    Visual Basic question

  • [Message Deleted]
    J Jesi523

    [Message Deleted]

    Visual Basic
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups