VS 2008 How Many Numbers User Input

Mar 18, 2010

I have an assignment that is supposed to accept user input of random numbers. The only part I'm struggling with is I'm supposed to make copies of the array after the user is done inputting the numbers. These copies has to be sized exactly to how many numbers the user input. Am I supposed to use a counting variable and if so how?

View 5 Replies


ADVERTISEMENT

User To Input Numbers From An Inputbox And It Displays The Total Numbers Entered?

Mar 18, 2011

I have a program that allows a user to input numbers from an inputbox and it displays the Total numbers entered, the sum of the numbers entered, and the average of the numbers entered. What I can not seem to find it how to have it display the largest number entered. The code I have so far is,

[Code]...

View 11 Replies

User Input 10 Inclusive Numbers Between 100 And 199?

Jul 27, 2009

I have been trying to have a user input 10 Inclusive numbers between 100 and 199, but it doesn�t seem to be working, can someone point out where or what am I doing wrong?

[Code]...

View 9 Replies

Display All Even And Odd Integers Between 2 User Input Numbers?

Mar 23, 2009

using for...next loop the program is supposed to accept 2 user inputed integers and display all even numbers between the two in one label and all odd numbers between in another label.

Private Sub displayButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles displayButton.Click
' displays the odd and even numbers between two integers
Dim intNum1 As Integer

[code]....

I'm not exactly sure what this code is doing. When I put 1 in the first number and 10 in the second number, the odd label only shows 9 and the even label only shows 10. Another example is when I put 2 and 15, the odd label comes out as 15 and the even label is 14. I'm very new to VB and programming in general and have just started getting into for...next loops and don't fully understand what the counter is or how the loop is supposed to work. I guess I'm having 2 problems. One is that I don't know how to make the program find the right numbers(my logic is off? or how I set up the loop isn't right?) and the other is the labels are showing only 1 number each instead of all the numbers in between on their own line.

View 1 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

Standard Deviation Calculator - Random Number Of Numbers Input By User

Feb 19, 2011

Im working on writing a program for doing standard deviation and as of right now im running into one slight issue with subtracting my mean from the original numbers. I will post most of my code so you can get an over view but i mostly just want help on this one little part for now. Im going to be making a website for school and put some programming stuff on it so i wanted to make just some random programs for it so this is school related but not really homework. It's line 26 and 27 that this is relating to. When i put a stop in my code and look at the result of arrayDifferences it gives me 0.0 when it should be -1. I know i can go this route and say arrayDifferences(1) = arrayDifferences(1) - arrayAvg but seeing as how i want this to be a random number of numbers input by the user i cant do that.

CODE:

View 4 Replies

Vb 08 Express Case Statement - Take User Input, Validate To Ensure There's No Negative Numbers

Apr 9, 2011

CODE:

I need to take user input, validate to ensure there's no negative numbers and display monthly fee and check fee in a Label.....with a calculate button_Click

View 1 Replies

Write A Program To Request Positive Numbers One At A Time From The User In An Input Dialog Box

May 12, 2009

I'm currently in VB class at my highschool and we just got chapter 6.1 to read on this online textbook that we follow. Anyway, we are doing loops now and the problem reads "Write a program to request positive numbers one at a time from the user in an input dialog box. The user should be instructed to enter -1 after all the positive numbers have been supplied. At that time, the program should display the sum of the numbers." So far I know this much

[Code]...

Now I know this isn't right But I can't find out how I'd pull out the numbers the user entered to get the sum of them and not include -1 because as it stands, when I hit ENTER with -1 the label just shows -1.

View 22 Replies

VS 2005 Read User Input Using Textbox But It Only Can Read Character And Numbers?

Jan 2, 2010

I know how to read user input using textbox but it only can read character and numbers. Is it possible that I want to read user input equation?

Example:

User type A+B
User put range of A and B.
1.25<A< 3.56
2.45<B< 9.87

I failed to read the equation using textbox. Is it there are other ways that can use to read equation input A+B?I am using VS2005 and VB.Net. I really new in this programming using VB.Net.

View 3 Replies

VS 2010 Multiplication In Forms - Multiply 2 User Input Numbers In Forms

Jun 22, 2011

I'm using VB 2010 and need to multiply 2 user input numbers in forms, so basically: TextBox5 = TextBox2 * TextBox3 That obviously didn't work but it shows what I want it to do.

View 3 Replies

Limit Textbox Input To Numbers And Range Of Numbers

Apr 4, 2012

i have one more issues, and hope is the last for now. How can I limit a textboxe's input to only numerical with certain range of values (eg -10 to 10) and with that happening while I type in the values?

View 9 Replies

VS 2008 User Input?

Oct 7, 2010

I am using Visual Basic 2008 and I have two text boxes so people can input information and I am trying to get it so it will run a code with user credentials. However the code is giving me an error saying that "Option Strict On disallows late binding."Here is my code so far:

Public Class CIBNA Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click

[Code]...

View 4 Replies

VS 2008 Unlimited User Input?

Apr 1, 2011

How would you let the user of a program enter an unlimted amount of numbers ranging from 0-100, and then have the program tell the user the highest and lowest values from the data they entered?The user would enter the data in when they clicked a button, and the program would sort the data out when another button was clicked.

View 8 Replies

VS 2008 User Input With Combo Box?

Jul 10, 2009

I am writing an app that uses a combo box to list file types for a user to select from. Because a complete list of all options is both impossible and wildly unwieldy, I am only providing about 10 common extensions. I want the user to be able to type in their own file extension if the one they need is not listed. the first item in the combo box is empty by default, but during testing when i type something in their to use as my selection, i get the exception "Object reference not set to an instance of an object." pointed at extensionComboBox.SelectedItem.ToString

View 7 Replies

VS 2008 Webcam With No User Input?

Dec 28, 2009

ive been steaming on this one for quite some time. Ive got a program that relies on remote control of the computer, and i need to be able to take a webcam image without the user having to press buttons etc. So far, ive gotten to the point where i can find my webcam, and with the help of a button, start a preview, then take the picture and save it as a jpeg.Problem is, when you press the button to start the preview, another dialog box shows up (not related to my code) prompting me to select a video source..Im confused kus it seems as though the list i find on form_load does nothing at all if when i press the button it prompts me with the same list.Well you can infer from this that i cannot use the btnstart_click(sender, e) on form_load because it opens a dialog that wont close until i press ok, and i already tried to sendkeys enter, it didnt work.anyone have any idea how i can either alter my code, or make new code to take a web cam image, and save it with no user input?

[code]...

View 2 Replies

VS 2008 - CipherText Encryption (User Input)

Jun 15, 2010

I'm a complete beginner to programming alone, let alone VB.net. What I need to do is encrypt a block of text inputted by a user using a keyword that will also be inputted by the user. This is all to be done using ciphertext, so naturally the user would be informed the keyword can not have any repeating characters. I figure the English alphabet will be predefined in capitals and lowercase, then the keyword will be read character by character, removing those characters from the alphabet array and then appending them to the end of it (to create the new encrypted alphabet). How to read the keyword character by character, and then removing the corresponding letter from the alphabet. The best I can think is to check each character of the keyword against each character of the array which I'm sure is much more work than I need to do.

View 1 Replies

VS 2008 - Having Label Equal To Be Value Of User Input

Jan 1, 2010

I have a form with multiple panels which hide/show as the user progresses through and inputs data. After they enter data in the first panel, I want a label in the next panel to be equal to one of their inputs. For example, in the first panel they enter their name in Textbox1. They hit next and it hides panel1 and shows panel2. Then I want Label1 in the next panel to be Textbox1 (their name).

View 1 Replies

VS 2008 - User Input Message Box Popup

Sep 26, 2011

Well I'm trying to have a if statement where when the user inputs the Title of the book [Title] then if it contained any letters then this message box would pop up. I also have another if statement where if nothing is there then messagebox would say that please input a name. [Code]

View 4 Replies

VS 2008 Combo Box Remember User Input

Jul 28, 2011

i have a combo box without a list of item now i want to do is when a user input a number or text in combo box the text value of the combo box will be saved and when the user input the same number the combo box will not save the same text value. and when the user logout and login back again i want to load the list of item that he or she inputted earlier in the combo box.

View 7 Replies

VS 2008 Save .txt Based On User Input?

Nov 16, 2010

I have a form with 12 text boxes that a user must fill. I need then by pressing a button to promt for the save directory and save the input as ".".txt file. Moreover i need each line of the txt to correspond to each one of the txtboxes. So the input to the first box will be the first line of the txt file,...the input of the ninth box the ninth line of the txt file.

View 15 Replies

VS 2008 Stop A For Loop Until Have User Input?

Jan 5, 2010

any way to stop a for loop untill i have user input, once the input is correct continue the for loop, is that possible at all?

View 4 Replies

VS 2008 User Input From A Text Box Into Code?

Apr 14, 2010

How do I get numbers typed into a text box to be feed into my code and then the code to be ran?Below is the code that I want the information from a text box to be fed into. With the (0, 50) being the numbers.I will have a form set up like this, A button labeled Generate. 3 Text boxes total, 2 of them side by side with one being low and one high. For example The user will input 5 in the low box at 100 in the high box. Hitting generate the numbers will then be inserted into code and the result being shown in the 3rd text box.

Now what is the code that I'm looking for that will help me take information from TextBox1 and TextBox2 and insert into the (XXXX, XXXX) field in my buttons code?

View 3 Replies

2008 - Getting Input - Finding If A User Has Been Inactive For A Time

Jan 16, 2009

I am trying to see find out if a user has been inactive for a certain amount of time by mouse and keyboard events. I want to be able to find this from windows not my form. I am lost as to where to start. I came across this "GetLastInputInfo Function" but am not sure if that is right and/or how to use it.

View 18 Replies

VS 2010 - Input Validation To Verify User Selected Input For 'cb Length Of Stay'

Jan 15, 2011

I need some help with the input validation of my application. Attached is the code that I have written as well as a screenshot of the front end. I specifically need input validation to verify that the user selected input for cbLengthOfStay is a number between 1-10 as well as input validation to verify the user input for txtMedication, txtSurgicalCharges, txtLabFees and txtRehabilitation is a positive numerical number. Please feel free to critique my attached code. [Code]

View 2 Replies

Creating User Input With Textbox.text Input Then Displaying In Messagebox?

Feb 19, 2012

If my Category and Forum selection is incorrect I am sorry and feel free to move it. I'd like to have the users input in the message box that will show. For example: There is a textbox and the user puts in their name as Bob. Then the message box would be: What my main goal is, is being able to include the users input they type inside the textbox inside the message box.

View 6 Replies

Box - Conversion Error - User Enters 6 Numbers In 6 Different Text Boxes - Displays The Larger Of Those 6 Numbers

Oct 4, 2011

I am making a program, where the user enters 6 numbers in 6 different text boxes, and it displays the larger of those 6 numbers. But I also want to make it where if the user enters a string value (like S for instance) in the text boxes, it gives an message and says "please enter the numbers again" and the user gets to enter the 6 numbers again. But when I do try to do that, it gives an error message saying conversion from "w/e the user entered" to Double is not valid. If the user just enters the numbers, it works fine. However, I am trying to make it if the user does enter non numeric value, it gives a message window and the user can reenter the numbers again.

Here is my code Example

CODE:

This is where I am trying to use IsNumeric to show a message if a user does not enter a string so the user can renter the numbers again, but when the user does enter a string value (say in textbox 1) it gives me an error message saying conversion from "S" to 'double' is not valid.

CODE:

Then right here this is where I have my series of ifs statements, this part works fine, it displays the largest numbers of the 6 textboxes every time. Error free.

CODE:

And do this with variable number 2, 3, 4, 5.

I know there are easier ways to do these with arrays and stuff. But I am not there yet. I am still learning about ifs and stuff.

View 8 Replies

VS 2008 Add A Message Box Or Alert To A MaskTextbox If The User Enters No Numbers?

Mar 21, 2011

I have a MaskedTextbox which takes Us Phone numbers. Using The MaskedTextBox ensures the user can enter only numbers and the number gets formatted right.

Here is the problem I am having: How do I add an error message if the box is left empty? I am not trying to validate the number, just need a way to add: "You forgot to enter a number." Can I add this to a MaskedTextBox?

How do I add a message box or alert to a MaskTextbox if the user hit submit without entering numbers?

View 7 Replies

VS 2008 - Generating Custom Code For Windows Form From User Input

Mar 30, 2009

How to generate code from user input. In Visual Studio 2008, Visual Basic. My script always begins with:

Code:
function Init(Quest)
Then from here a user would input a quest name, type and zone in a interface using windows forms.
Ex:
Code:
RegisterQuest(Quest, "Kill Zombies", "Heritage", "Firestorm")
end
This part a user would enter in his interface what would an NPC say if accepted.
[Code] .....

What I need is a few text boxs that a user can input "Kill Zombies" or whatever they like and when they push a generate button it will create a file with a .quest extension. All of the code remains the same except for the quotes that would be the user input from the interface. Basically everything in quotes can be changed by the user in an interface. I have created my own functions for when a user accepts, deny and complete a quest. The user just needs to input what should happen then click a generate button to throw it all together as a .quest file to be saved in his or her quest folder for the server to call on later.

I also have many other functions like:
AddQuestRewardFaction --- (Quest, Faction ID, Amount)
AddQuestRewardCoin --- (Quest, Copper, Silver, Gold, Plat)
AddQuestStepObtainItem --- (Quest, Step ID, Description, Quantity, Percentage, TaskGroupText, Item ID(s))
Etc

I would also like to have these available on the UI but wont generate unless a user checks a box to add them or there is a box already for them but wont step into the code unless the user enters something into the box.

View 4 Replies

Get User Input Data Into The Loop Of The Input Box?

Nov 3, 2011

Option Strict On Public Class Form1 Private Sub btnDistance_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDistance.Click 'The btnEnterSpeed click event accepts and displays up to ten speeds from the user'and then calculates and displays average speed

[Code]...

I cannot figure out how to incorporate the number of days into the input box then get it to loop and count the number of times the User inputs in the number of days. Then I have to incorporate it into the equation to get the total distance D = MPH * Hours. What I have right now wil not count up the number of days and locks up after I input one number and will not add anything to the listbox. Because I also have to make sure that they cant add nonnumaric values and the number of hours per day cannot exceed 20. I have put things in and taken them out but it has been 2 days and I am lost now

View 1 Replies

VS 2008 - Validation Functions / System Displays A Message Telling The User To Input Any Fields?

Apr 1, 2010

iam currently working on my uni project and i have encountered a problem with valadation section.My system displays a message telling the user to input any fields that they have missed out on, listing the name of the field. However as these IF functions are in order the user must input the data in the order of how it is in the code. for example if the "consweight" is inputed and the calculate button is pressed, it thinks that all valadation above it has occured, when those fields are still empty.

[code]...

View 1 Replies







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