Getting The Value Of The Character?
Jun 22, 2010
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)
[code].....
View 2 Replies
ADVERTISEMENT
Aug 25, 2011
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.
View 3 Replies
Jul 10, 2009
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.
[Code]...
View 3 Replies
Dec 12, 2010
[Code]...
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.
View 12 Replies
Feb 17, 2011
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.
View 2 Replies
Feb 16, 2012
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]
View 2 Replies
Nov 11, 2009
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.
View 7 Replies
Aug 23, 2010
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.
View 1 Replies
Jul 15, 2011
I have a value I am pulling into a string that looks like this:
M'arta
I need to have it to translate the numeric value into an actual value so that the string looks like this:
M'arta
how to accomplish this in VB.NET? Here is the relevant line of code that returns this result:
Dim occupant as String = GridView1.Rows(e.RowIndex).Cells(2).Text
View 4 Replies
May 9, 2010
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".
Example:
E102 - corect
e3ff - correct
[code].....
View 4 Replies
Nov 11, 2009
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.
View 17 Replies
Jan 15, 2012
I am trying to error check a piece of code
This is from my previous thread which 'Codeoder' help me on..
[URL]
I have a RTB which I import with a set of 7 or 9 didit numbers, 7 for Staff and 9 for Students. e.g. Staff numbers
0628189
0628191
0629991
[Code].....
View 8 Replies
Jun 13, 2010
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
[code].....
View 15 Replies
Feb 1, 2011
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.
View 3 Replies
Jun 23, 2011
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?
View 6 Replies
Aug 28, 2010
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,
View 4 Replies
Feb 5, 2010
i use this code to split a words:
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..
View 1 Replies
Mar 13, 2009
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()
[Code].....
View 2 Replies
Oct 20, 2010
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)
[Code].....
View 6 Replies
Aug 21, 2009
i would like to add a character or characters, at the end of every line in a richtextbox..for example, add this ";o)" to the end of every line.[code]
View 5 Replies
Feb 13, 2011
I need to add the character " but as it is already used by VB itself it is impossible to add unless you have the Chr code or something like that..
View 2 Replies
Mar 5, 2010
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?
arrDataHolder = txtDocument.Split(CChar(","))
View 1 Replies
Nov 10, 2009
Dim mytext As String
[code]...
View 7 Replies
Jan 29, 2009
I have a string value "password" and i would like to increase each of the characters in the string by 2 position.
View 5 Replies
Jun 18, 2012
i want to creat crystal report in form of bulk and i want to use one 131 chqrqcter in that and at the end i want to use verticale bar
View 4 Replies
Jun 8, 2011
In System.Windows.Forms.Keys, what is the name of the backquote (`) character? Is backquote not its proper name, or is it just a quirk of VS?
Or, otherwise, what is its numeric value?
View 1 Replies
Feb 9, 2010
Is there any way to put the "&" symbol on a button text? VB keeps converting the name "Forty-Six & 2" to "Forty-Six_2".
View 6 Replies
Sep 16, 2011
I'm printing a textbox which prints correctly except the tab chars are missing. So instead of:
123 456
I get:
123456
As mentioned replacing tabs with spaces is not suitable. (VB.Net 2010)
View 4 Replies
Sep 8, 2011
Data comes into the project from various sources and sometimes I am seeing what looks like a tab character
in front of the actual data. Now I thought this would work, covering all eventualities. but I get
'Conversion from string "Z" to type 'Double' is not valid.'
check is declared as a string. If Microsoft.VisualBasic.Left(check, 1) < Asc(32) Then
[Code]...
View 14 Replies
May 23, 2009
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!"
View 4 Replies