Compare Numbers In Program?

Mar 26, 2012

Again i am stucked on this: i have googled it but[code]...

View 12 Replies


ADVERTISEMENT

Compare Numbers In VB?

Mar 26, 2012

I NEED TO COMPARE 6 NUMBERS from 6 TEXTBOXES with 35 random generated numbers here is what i got:

Dim N(5) As Integer
N(0) = Val(TextBox1.Text)
N(1) = Val(TextBox2.Text)

[code].....

View 19 Replies

How To Compare Numbers

Oct 6, 2011

I am working on my work here and I am not sure how to proceed. I am to write a program that has 3 labels with names in one and a number in the other then the program is supposed to output who is in first second and then third. I am not sure if I am to use an if statement or a case statement. I assumed a case but it was a lot of code that didnt work, I had if time 1 was > than time 2 then a second case if time 1 > time 3 and do that all over again if time 2 > time 1 and so on.

View 6 Replies

VS 2008 - Compare 6 Numbers

Oct 27, 2010

Here is the problem: I have 6 numbers in an array(dim ascore(5)) and I want to find who is the bigger one(I would like the number of the variable in the array to be returned, like ascore(2) or ascore(5)...). My mind is stuck!

View 4 Replies

Compare Numbers With 2 Decimal Places In .NET?

Jan 9, 2012

I'm trying to compare Office version numbers in vb.NET How can I determine if: 12.0.64 is greater or less than say 12.0.62 or 14.0.4762 It seems the fact that there is 2 decimals, vb doesn't like it.

View 1 Replies

Program To Randomly Select Numbers For A Bingo Caller - Prevent Reversed Numbers Being Selected

Mar 6, 2011

I have just about completed a .NET project to write a program to randomly select numbers for a Bingo caller. Over the last month or so Ive learned a lot about .NET but heres something that I consider to be odd and maybe one of you guys can offer an opinion.

One of the features of calling Bingo in a small local club is that callers often use little sayings to accompany certain numbers, I expect youve all heard of (say) All the sixes, clickety click for 66 or 5 and 9 the Brighton line for 59 etc. My little program gives an option to incorporate these with a prompt for the caller that can be edited outside of the program. One of these conventional sayings is used when a number is reversed 12 followed by 21 or 45 followed by 54 for example, when the caller might call (say) 1 and 2, one dozen, number 12 And the other way round 2 and 1, twenty one.

So, I programmed in a bit of code to detect this and to over-ride whatever might otherwise have been the quote with And the other way round and set about testing it. Ive been through literally dozens of full 90 calls watching for the occurrence of a reversed number, spent a few hours doing it, and not once has it occurred which is to say the least, unusual.

So, Im wondering about the Rand Function, could it be that it isnt possible for a reversed number to be selected? Just so you know, I randomly pre-select the order of all 90 numbers, I fill each of the 90 elements of an array with a random number first checking that the number selected hasnt already been stored, if it has, I just get the next random number (and check that too of course), but I cant see how that could prevent reversed numbers being selected, especially in light of the fact that frequently it's not the 'next' number that's used.

View 39 Replies

Make A Program That Will Calculate Sum Of Consecutive Numbers Between Two Given Numbers

Jun 4, 2012

I'm trying to make a program that will calculate the sum of consecutive numbers between two given numbers. [code]

View 13 Replies

Compare All Controls Of Program?

Nov 6, 2009

I want to know and compare all controls of vb 2008. where to go? what to do?

View 1 Replies

Make A Program That Will Compare 2 Documents?

Feb 28, 2009

I am trying to make a program that will compare 2 documents. Idealy what this program would do would be to let the user define key words that he/she is looking for then hit the compare button and have those key words higlighted in both text documents. So far I have 2 button that paste stext into eather box and button that says compare this is my current code for the compare button

If tb1.Text = tb2.Text Then MsgBox("compatible!", MsgBoxStyle.Information) this works great but it only works if the text is exactly the same I just want it to pick up on words that are the same in eather box and eather A. show a message box that tells the words that are the same or better yet B. have them highlighted. I want to do this as simply as possible so if we have to leave out the key words thats ok. I am a big noob and don't know too much about VB (although I came up with that basic code myself thats about all I can do XD) so please bare with me.

View 3 Replies

Palindrome Program Using String Compare()?

Apr 12, 2010

I need to create a code using String Compare() and Cases to figure out if a word, phrase, or what is typed in a textbox is a palindrome. If it is, a message will appear in a label under the textbox that reads, "What you typed is a palindrome." Or, "What you typed is not a palindrome." , if it is not.

View 16 Replies

Run VB 2005 Program Constantly And Compare Date/time?

Sep 29, 2009

I made a little application that check the servers and if the servers go off for more than 5 mins then the program will sent me a mail.My problem is how do I compare the server date time witch display in a textbox to the real datetime which display in a label also how do I run the program constantly till the user decides to exit by clicking on a exit button.

View 4 Replies

Write A Program That Will Compare Two Strings In Different Text Boxes?

Apr 18, 2009

I am trying to write a program that will compare two strings in different text boxes. Then it must add 1 to a third text box for every time a letter appears in both text boxes. So for example if textbox1 said ABCDF and textbox 2 said ABTR it should return the number 2 because A and B appear in both.
This is what I have so far

Public Class Form1 Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles string1.TextChanged
End Sub

Private Sub Compare_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Compare.Click

Dim string1 As String
Dim string2 As String
Dim Result As Integer
End Sub

Function stringcompare(ByVal string1 As String, ByVal string2 As String, ByVal string3 As String) As Integer
stringcompare(string1 As string, string2 As string) End Function End Class

View 4 Replies

Compare Date - Compare Textbox1 And Textbox2 Text

Mar 3, 2010

I have two textbox in my application.

Textbox1.Text="19-Jan-2010"

Textbox2.Text="Jan 2010"

May I know how can I compare that Textbox1 and Textbox2 text is within same month and same year?

View 1 Replies

Perfect Numbers Program?

Nov 6, 2010

So I am trying to solve this program using the algorithm given, and I get no error messages but everytime I execute the program it just crashes. Any idea what I am doing wrong?\The user wants a program that will return a set of perfect numbers based on the value that is given. If the user types in 3, the program will return 3 perfect numbers

So this is the code I have so far...
dim perfectnumber as integer = 2
dim divisorRunningSum As Integer = 2

[code].....

View 1 Replies

Forms :: Break Down Numbers Program?

Sep 8, 2009

I am currently writing a program that when a user enters a number such as 1267 and clicks a button the number will then be
broken down by its ones place, tens place, and so on. So it would show up as One place is: 7, Tens place is: 6, and so on.Well I need a little help trying to figure out what code I would write to test or separate each single integer. So far I have only been able to separate the ones place using:

Dim ones As Integer = Microsoft.VisualBasic.Right(TextBox1.Text, 1)
'display each value in the corresponding place
Label11.Text = ones

of course this code wouldnt work for the rest of the digits entered.If a user were to enter a bigger number lets say:

12345

then i would need to display

thousands place is: 12
hundreds place is: 3 and so on and so on

View 9 Replies

Program A Text Box To Only Accept Numbers?

Mar 31, 2012

This displays as many numbers as i want but will also display a single letter.

Private Sub txtEnterGrades_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtEnterGrades.KeyPress
Dim intKeyValue As Integer

[Code].....

View 4 Replies

Program For Prime Numbers Stumped?

Feb 25, 2010

Simple Program for Prime numbers stumped?

View 1 Replies

Program That Throws Out A String Of Six Numbers From 1 To 37?

Feb 12, 2012

I have a program that throws out a string of six numbers from 1 to 37, what I need to do is check the the string for for a format you could say.I need to make sure the set of six numbers doesn't contain 4 or more numbers of the same numbers from the same set of ten(s).

Like this:I can't have: 1-3-6-7-8-12 Or 12-14-16-18-20-21 Or 21-23-26-28-30-31 Or 30-32-34-36-20-22

I can have : 1-3-6-12-17-23
////////////: 12-14-16-20-21-22
////////////: 20-1-13-23-26-30
////////////: 1-37-22-33-30-9

[Code]...

View 5 Replies

Remove A Colon Between Two Numbers In Program?

Apr 28, 2009

I have a text in this format:

term: 156:59 datainput

I want to remove the ":" between the number and then replace it with something else so the text can become

View 3 Replies

Basic Prime Numbers Array Program?

Apr 20, 2011

First off, I'm not sure if this is the right forum, please move it if it isn't. I am only just beginning with visual basic and I am trying to write a basic program to calculate the prime numbers from 1 to 100. This is what I have so far:

[Code]...

View 3 Replies

Create A Program That Finds Prime Numbers?

Oct 7, 2010

So I have been assigned to create a program that finds prime numbers. And then for the final part of the program I need to have the computer find the millionth prime.

View 3 Replies

Create A Program Which Will Allow The User Enter Ten Numbers?

Nov 5, 2009

5. Create a program which will allow the user enter ten numbers. The program is to count how many numbers were above 50?

View 1 Replies

Design Program In ConsoleApplication About Phone Numbers?

Dec 1, 2011

I'm supposed to design this program in ConsoleApplication about Phone Numbers:

You are writing a program and you need to store telephone numbers. You'd like to be user-friendly, and let the users enter their telephone number in whatever format they like with parentheses and dashes, so long as they enter 10 digits. Assume that they won't enter any other characters. The user will only enter ( ) - spaces and numbers.So, these would all be valid inputs

[code]...

View 10 Replies

Make A Program For Finding Prime Numbers?

Dec 21, 2011

I needed to make a program for finding prime numbers. The logic is that you have to put limits n & m and then LOOP and odd-integer P between n & m inclusive. I have a button to click on my form that displays 2 message boxes, one saying " enter upper limit" and the other say "enter lower limit". I need now to get the results of the odd prime numbers between the limits into a list box!

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code].....

View 39 Replies

Make A Program That Makes All The Possible Characters And Numbers?

May 8, 2009

how to make a program that makes all the possible characters and numbers (A-Z & a-z & 0-9) from 5-20 characters, and put them in a list or something?

Someone may think this is bruteforce hacking, but I don't see why I should do that? If I want to find a password on 13 characters, it would be: 62^13 = 200028539268669788905472 possibilities... in other words... it would take forever!

View 3 Replies

Make A Program That Will Take 2 Numbers Input By The User?

Jan 21, 2010

I am new to VB.Net and programming all together. I am trying to make a program that will take 2 numbers input by the user, Add them together and display the sum. Then take the sum and divide it individually by each number to give you what percent of the sum the numbers are. I'm working on making it a program that will calculate the Hardy-Weinberg equilibrium for my Anthro Class. I'm just doing this for practice for my VB.Net Class. But i will move onto that at a later time. I just want to finish this first.

So.. Here is my code so far. It's not complete yet but this is should be enough to make it function.

[Code]...

View 24 Replies

Make A Program To Grab Numbers From The Screen?

Oct 13, 2011

I am making the tough transition from VBA to VB and would be pleased to hear from a VB expert. I am trying to make a program to grab numbers from the screen so that I can log them to a text file. The numbers are part of a flash animation which is regularly updating the number I want to capture and as there is no API i am grabbing the region where the number is displayed into a bitmap and then want to recognise the number with OCR. The code below grabs the screen region ok.

[Code]...

View 1 Replies

Way To Generate Random Numbers For A Program Working On

Feb 22, 2010

I am a newbie programmer and I need a way to generate random numbers for a program I am working on. It just needs to be something simple that generates a number and allows me to assign it to a variable. I would like it to be something small say 1-10 would be good and an explanation of the syntax would be helpful

View 9 Replies

Create A Program To List A Large Group Of Numbers?

Feb 7, 2011

I am currently trying to create a program to list a large group of numbers for me. My final goal is to have every 2, 3, 4, ..., and 9 digit number containing only "1" "2" and "3". I thought I would go about this by using the following VB.NET program and then copying it into a text editor, and using find & replace to eliminate all other numbers.

Public Class Form1
Dim Start As Integer = 333333333
Dim Counter As Integer = 333333333

[Code].....

it fails due to the massive amount of processing that needs to take place. However, adding the intervals requires a great deal of time for each number to be displayed without any crashes.

Is there some way (in VB.NEt or another language) to get the number list I want in a short (an hour or less) amount of time?

View 7 Replies

Create Program That Adds The Whole Numbers From 1 To 1000 And Displays?

Feb 2, 2011

I have to create program that adds the whole numbers from 1 to 1000 and displays the sum in the label. Create a variation of this program that allows the user to specify any starting whole number and any ending whole number (10,000 or lower) and then adds all the whole numbers in that range. Allow for the possibility that a user may start with a high number and end with a low number. Format the label so that commas are displayed and there are no decimal places showing. I need help with the codes.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved