Change The Integers To Words
Feb 15, 2012I have made a simple program for invoices, e.g. The total amount is coming 48,950/$, How to appear this amount in words "Forty Eight Thousand Nine Hundred and Fifty, through MODULE.
View 2 RepliesI have made a simple program for invoices, e.g. The total amount is coming 48,950/$, How to appear this amount in words "Forty Eight Thousand Nine Hundred and Fifty, through MODULE.
View 2 RepliesI tried coding for an application that will display the positive integers, negative integers and zero entered in a inputBox. for some reason it keeps crashing down.here is my code. paging all visual basic professionals. [code]
View 6 RepliesI have a text box in which you enter last name first and first name last ex. (wojo casey) and I would like to change it so the output states Casey wojo
View 6 Repliesif I have Textbox1 to type numbers
and how to convert numbers to words in Textbox2 ?
like
1= one
2=two
23= twenty three
and so
how to do that ?
I'm trying to make a text editor, and I want to make it highlight different syntax in different colours.
E.g. when the user types in <html> I want that to appear in red.
How exactly would you go around doing this?
For a better visualisation, this is what I have so far:
From the properties pane of VB.net, I can only change the whole TextBox's font colour.
Ok, Im developing a scripting tool for the program "FPS Creator". The scripting uses of course commands which are split into to groups (Action and Condition)
Anyway to the point :
I need the Actions and Conditions to be coloured so the user knows when the command is correct or incorrect.
So, I've started to work on a big project that involves analysing text and changing that text into a whole new group of words that relate to it and say pretty much the same thing but through different text, I'm just looking to see if there is a thesaurus or dictionary I can access through visual basic... instead of having to right every single word in the english dictionary out.. or if there is any shorter way I could do this.
View 1 RepliesI'm using a SortedDictonary(Of String, String) in my application, and I experience a strange sorting behavior. Consider the following code example:[code]I would expect the keys to be sorted as "'A", "'B", "'C", "A", "B", "C", which is what you get when comparing the keys "by hand", through the < operator. And yet, iterating through the keys returns "A", "'A", "B", "'B", "C", "'C".How can I change the SortedDictionary behavior to sort the words beginning with ' first?
View 3 RepliesI have a WPF RichTextBox which contain in its FlowDocument both text and images. I need to iterate through the text's words (those which builds the text which the user see on the screen) and change their content and formatting. For instance, change the word "room" to the word "home", applying to the last a red color.
I need to change words whether they are formatted or unformatted.For instance, if a word is in Italic, colored, or just regular black text, it makes no difference for me.Each word will be replaced with one which have about identical length, so I don't want that this operation will effect the general page layout. All images and other objects should remain at their positions.It is preferred that the process of this operation will not be visible to the user. Only its result should be visible (i.e, no visible selections of text).If this operation can be done either directly on the FlowDocumet or with properties/methods of the RichTextBox, the simple one is preferred (but exmaples for both will be ideal).
Basically I have and array of integers that vary in size. I need to compare each number to each other number and display which number is repeated. For example:
Dim ints() As Integer = {1,2,2,5,4,6}
The number that shows up more than once is 2.
How can I run through the array and compare each integer with the numbers in the array. I tried a for loop but it didn't return the value I was looking for.
i want to create a html editor. to get started, i want the app to be able to find certain words, and change the font/color/size/etc. as for <a href=""><b> and so on, without changing the rest of the text after the selected text was modified. i'm sure that it has something to do with RichTextBox1_TextChanged for text that is being typed and just a button click for modifying selected text.
View 10 RepliesI've got 2 RTB one is for input of text and one is output.The output one needs to read the words from the input and display it alphabetically and with their line numbers.I have partly done it and it currently reads it but here is my problem When the words are outputted let say for example there are 2 words the same on the same line e.g the word 'you' appears twice on line one,at the moment its coming up like this
[Code]...
other than GML (Yoyogames.com Game Maker Language), I am new to the coding world. The only "major" project I have completed using VB is a computer calculator that exactly mimics the capabilities of Windows 7's calculator. Yesterday, I began a Chatbot program for my girlfriend. Lol. I have used the instr() function to answer most of the questions or answers which are typed into the textbox1. I find this extremely troublesome because when using the instr() function you cannot say instr(textbox1.
Public Class Form1
Dim fos As String = "Foster: "
Dim ash As String = "Ashley: "
[code].....
this is what i need done add up the sum of all the even integers from 2 to 50 in VB?
View 1 RepliesI'm making a program that will use .split and I only want to split every other instance. The way I want to do this is by splitting by only odd integers, how do I do this?
View 5 RepliesI would like to know if there is a command to make a program choose between certain integers. For example, I would like my program to make a random choice between the numbers 12, 118,224 and 300.
View 1 RepliesId like to use 4 integers in a For, Next loop. The integers are 1, 3, 7, 9. Is it possible to pass just these integers to the loop without putting them in an array or something similar?
[Code]...
What is the formula in VB for finding the average of two integers?I know in normal math it is e.g. (4 + 6) / 2 it only needs to be the average of two values.
View 5 RepliesSo I am making a file crypter so that I can encrypt my VB.NET Application that I am making so that people can't decompile it. I had made this in C# and am transfering it to VB.NET, Everything worked fine in C# but once I had re-written the code in VB.NET i get this error inside of my RC4 Encryption method:
'Arithmetic operation resulted in an overflow.'
The error is occuring here:
Dim t As Int64 = (s(i) + s(j)) Mod 256
This is the same code above in c#:
int t = (s[i] + s[j]) % 256;
Is there anyway to make that calculation with it erroring? And why does it work in C# but not VB.NET?
I need to add integers in a listbox, using for next.
Dim intCount As Integer
Dim dblTotal As Double
' here are the lines of code that will perform the calculations
' to create a grand total.
For intCount = 1 To lstCosts.Items.Count
dblTotal += dblSubTotal += intCount
Next intCount
lblTotal.Text = dblTotal.ToString("C")
The amount of items in the list box is not seso I used the items.count. I have been getting the wrong result.
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
' Declarations.
Dim intCount As Integer
Dim dblTotal As Double
' here are the lines of code that will perform the calculations to create a grand total.
[Code] .....
I have a group of 25 labels named Label1, Label2, Label3, ... Label25 in a square of 5 per row, 5 per column and I wanted to assign the backcolor to all of them on a loop and assign a value of "True" or "False" to a matrix of 25 boolean values representing them.
But I was getting errors on the pattern created.
My approach was to use a substring containing a number copied from the label names:
Num = Val(sender.name.substring(5))
And the subindexes of the matrix:
p = (Num - 1) / 5
q = (Num - 1) Mod 5
The values for the lower corner of the matrix were rouded to 5 instead of being 4. Instead of (4,0) ,(4,1), (4,2), (4,3) (4,4) I was getting (5,0),(5,1)...(5,5)
So I solved the problem by creating two single variables "A" and "B", doing the divission and MOD operations on them, finding the floor of them and then converting to integer:
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _
Label1.Click, Label2.Click, Label3.Click, Label4.Click, Label5.Click, _
[Code]......
I am working on a program that has many integers (q1, q2, etc.), and each of them can be 0 or 1. This is dependent on which radiobuttons are selected. I need it to check and make sure that all of the integers have a value, but since "Null" is the same as "0",
View 8 RepliesI suspect there is something wrong in my application, specifically in a part where I have to compare a couple strings and a couple integers.
I do something like this:
If myString = myOtherString Then
do something
End If
And the same thing for integers.
However, for some reason, it is not returning true... also, I heard somewhere there were more proper ways to compare strings and integers.
I have a method that I want to check to make sure that both integers entered are both positive:
Public Function BothPositive(ByVal num1 As Integer, ByVal num2 As Integer) As Boolean
If (num1 And num2) > 0 Then
Return True
Else
Return False
End If
End Function
Now if I were to enter some numbers in
BothPositive(1,1) = True
BothPositive(1,2) = False
BothPositive(-10, 10) = True
Why is this? What is going on with the order of operations in the comparison statement or what is the "And" trying to compare? I don't see why this wouldn't work.
How do I convert hex and integers to binary?
View 5 RepliesI;m trying to learn from vb 6, and am having trouble with the simplest of things. I got a function that needs a point, im trying to feed it my 2 x and y integers and it can only accept a point. How can i convert my 2 integers into 1 point.
View 2 RepliesI have log files that are filled with a lot of content. All of the lines in these files read simliar to the two examples below:
2006-06-16 06:40:25 00.11.111.222 englased 172.16.3.4 80 GET /XXX
2006-06-16 06:35:00 222.222.111.111 GBEDEYA 172.16.3.4 80 GET /XXX
2006-06-16 06:35:01 222.222.111.111 CEADETAA 172.16.3.4 80 GET /XXX
From line one i need to extract englased, from line 2 GBEDEYA and so on.
I know that all the lines have GET, and basically I only need to exact the letter from the begining until GET to get what I need.
So i would read each of these strings until GET and gets the Index. Then I would need to record all the characters that are letters from 0 until GET (ignoring all integers and special characters).
My program uses the serial port to receive characters as a string, then it should extract the integers from this string. This seems fairly simple, but so far has been a very tedious job.
My string is called txt. The problem is that there's no telling how many characters / integers txt will hold at any given moment. For instance, it may equal "4" or "4 5 6 7" or "P 0 1 2 3 4 5 6...255" - with spaces included. I need to reference every number within this string to use as data. I've tried the following:
dim c as new char
dim n as new integer
dim i = 1
[Code].....
How do you ask the user to enter in 3 different integers?
View 17 RepliesI Know you cant sum to strings to each other so i trying to make the variables to Integers first but i can figure it out why it does not work![code...]
View 12 Replies