Enter the word New, and press the enter key on your keyboard again. Your menu will look like this: To create items on your File menu, click inside the Type Here box. Type the word File: Now press the enter key on your keyboard. ' This removes spaces, but retains the tabs and new linesĬonsole.WriteLine(regSpace.Replace(testString, String.Empty))Ĭonsole. To start building your menu, click inside the area that says 'Type Here'. On the form, add 2 TextBox controls (that you will name txtFName and txtLName), a ErrorProvider control. ' This prints the string on one line with no spacing at allĬonsole.WriteLine(regWhitespace.Replace(testString, String.Empty))Ĭonsole.WriteLine("Replace all spaces :") To do this, create a new VB.Net Windows application. "Second line followed by 2 tabs" + vbTab + vbTab + _Ĭonsole.WriteLine("Replace all whitespace :") That will be the code you need to do the same thing at run. MenuStrip and the items you want using the GUI designer, then look at the. ' Use to match all whitespace (note the lowercase s matters)ĭim testString As String = "First Line" + vbCrLf + _ A good way to discover the code needed to do what you want is to add a. For that regular expressions are the most flexible approach I've found.īelow is a console application where you can see the difference between replacing just spaces or all whitespace. "Spaces" in the original post could refer to whitespace, and no answer yet shows how to remove ALL whitespace from a string. 1 Answer Sorted by: 2 Select the menu bar item and go to 'Properties' and 'Items'/ (Collection) Hope this helps Share Follow answered at 17:16 Jay 152 5 Didn't saw that property earlier.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |