So basically my program lets you input a TXT file and I want it to add a "{" character after every OTHER character. Here is my code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim sIn As String = System.IO.File.ReadAllText(Me.OpenFileDialog2.FileName)
How do I write an expression to calculate all characters of each row by my own defined value to each character = all the A and B and C and etc. will be as 2 and all I and J and whatever ... will be 1 so I need an end result of the total.
I am working on a sub that essentially needs to open a text file, and replace all instances of a certain character with a unicode character. I'm trying to do this by reading the original text file byte by byte, converting it to a character, and then either adding that character to a memory stream or writing the unicode character to the memory stream. Then I'm saving the memory stream to the original file.
For each character of this string I want a new character out of the string and then remove the character from the list of characters that still maybe used for other characters. It may not get the same character, you could basically just call this encryption, but it's not what I am making. I don't want to waste my time doing this one hour while VB can do this for me in <1 second.
I am writing a hangman type game and I am displaying the word to the user in a label as all *'s, but I cannot figure out how to have just one of the *'s changed in the label to the correct letter when the user inputs the correct letter into the text box and clicks the check letter button.Everything else in the program works perfectly, except for this part.[code]When I use the .Replace it changes all of the *'s to the correct selected letter.
the coding is to 'Get input string and put its character into List, and replace the character with other.'but having problem putting each character into List and also replacing it,[code]
I want to read a text file(.txt) character by character into a database.There are 28 characters on each line and I want to read the first 16 into a column in a database and the rest in another column in the database.
In my VB.NET application I compare words that are recorded using IPA, many of which have many diacritic marks. In one of the comparisons, I compare the words character by character. But when I iterate over the characters, the diacritic marks come out as separate characters (as I would expect since this is unicode)However, a u character is different than a u plus an accent for the purposes of this program and needs to be distinguished.
My form has a texbox where user enters an ID. IDmust be4 chracters in length andof the form: begins with either "E" or "e" and the next 3 chracters cannot be "all characters".
I want to read a text file(.txt) character by character into a database.There are 28 characters on each line and I want to read the first 16 into a column in a database and the rest in another column in the database.
I've been working with the substring command and after coding up all the things I needed it to do, I saw a post on here where the "For Each" statement was used basically to do the same thing.Lets say we just want to take a string apart one character at a time and add each character to a label. Which would be more efficient?I made a cheap example to show ...
Code: ABinary = "0110 1100 0001 1011" For x = 0 To Len(ABinary) - 1
I'm able to convert a character to its corresponding Character/ASCII code using "Asc(CHAR)". I can't find anything on converting this returned Integer back to its original Char form.
I have MIDNAME column in my table. I want to remove all the character starting from the second character going to the right and after removing it, a period "." will be added right after the letter which left. How do I it?
I have two textboxes (InputTextBox, OutputTextbox).In the InputTextBox, if I type "a" I need to display tamil letter "அ" in OutputTextBox.For the above requirements, I tried like below,
Dim sWord As String = "Word1~Word2~Word3~Word4" Dim sResult As String() = sWord.Split(New Char() {"~"c}, StringSplitOptions.RemoveEmptyEntries)
so that a messagebox can show
Word1 Word2 Word3 Word4
but how about if the character to split are 2 or more character instead of "~"? because sometimes "~" is used in some documentation.. i prefer to user "!~!" or "D-:" in splitting words..
how to know the value of the specific character when i pressed the keyboard, a messagebox will pop out and tell's value of the character that I pressed. For example character a=65 "not sure if it's the real value of a" heres my code..
Private Sub frmMain_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress MsgBox(e.KeyChar)
For the SendKeys, is it possible to 'send' a non-character key? I want to send a direction key (Left direction key) whilst a textbox is in focus so it moves the bar left along the characters, so that - for example:
Code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Focus()
I have a streamreader that is reading a file that has the possibility of having the contained information being separated by either a space, a semicolon or a comma, or even a page break.How can I check for all those things and then place them in a array?'I know this is the way to check for one character, how do I add on to this?
How would i set a minimum number of characters in textbox1 for a button to work. and if the person does not enter the minimum number of characters, a messagebox pops up sayin something like "need at least 5 characters!"