How To Have User Enter In 3 Different Integers
Feb 9, 2011How do you ask the user to enter in 3 different integers?
View 17 RepliesHow do you ask the user to enter in 3 different integers?
View 17 RepliesMy assignment is to have a user enter in big integers using what i think is two parallel arrays. I got this far but now im stuck. I think i need to actually convert the text box input into an array but i do not know how to do that. I am all over the place in this project.
'Created/ Revised by: Jessica Falcetta
'Cap 204 Final Project: Big Integer Project
'Project Purpose: To calculate large integers through parallel arrays
[CODE]...
I Create an application that when a user enters a positive integer value in a input box(the default number is 10) when the OK button is clicked, the application should display a message box with the sum of all the integers form 1 through the value entered by the user. If the user enters a negative value, the application should display an error message. I believe I have to use a loop condition but I have no idea what to do.
EX: User enters 10 in the input box once OK button is pressed a message box pops up and says "The sum of the numbers 1 through 10 is 55". Use the following test data to determine if the application is calculating properly
VALUE SUM
5 15
10 55
20 210
100 5050
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.
I 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 RepliesBasically 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.
How do I make it that the user must enter a number between 1 and 100? And If they dont they get an OK messagebox stating that they must do.I imagine it'll be something like this:
If TextBox1.Text = "" Then
MessageBox.Show("You must enter a value between 1 and 100", "Name Entry Error", _
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End If
But Im not sure whats suppose to go inbetween the speech marks.
Using MVC, EF 4.2. I am working on an application that has a comment section. Right now if a user enters a comment that contains HTML e.g.<b>text</b>and hits submit i get the message "A ptentially dangerous Request.Form value was detected..."How do i handle html on the way into the db? Should I just strip the html? Or encode it? I tried server.htmlencode the text but i still had the same error message.
View 4 RepliesHow can I prevent the user to enter characters but only numbers and '.' in a textbox in vb.net 2005?
View 4 RepliesMy textbook mentions nothing of it except for the example where me is in the code.'This event handler allows the user to enter the island choise 'and then calls subprocedures to place the island activites in the list.
Dim intIslandChoise As Integer
intIslandChoise = Me.cboIsland.SelectedIndex
lstTours.Items.Clear()[code].....
If we format a value for percent "{0:#%}" then it will become 400%, and this also applies to all the 3rd party controls I've tried. I've used custom format as a workaround for this but perhaps you guys could enlighten me on this one. If a user inputted 4 for example then did the user intended 4% or 400%? If it were me that I would expect the 4 to be 4% rather than 400%.
View 11 Repliesi want the user only enter text value in texbox. I use this code to do but it gives me a error.
[Code]...
I need to write a program allowing the user to enter up to five passwords at one time. I have the textboxes set the way I need. When the user presses the button, the code should check every password they ve entered, and flag any passwords that are invalid. A valid password includes the following:
At least 6 and not more than 15 characters
At least one uppercase alpha character
At least one lowercase alpha character
At least one numeric character
I'm a little confused about how to check each character of the entered passwords for these conditions.Because it must include alpha characters, I believe I have to do something with ASC and CHAR variables. This is my first post and I need to have this done within a few hours, haha. Help would be awesome.
I dont know how many times user want to enter data .i want to add a new row at the end of arrray everytime user enter the data.
Dim vNames(-1) As String
For vIndex = 0 To vNames.Length - 1
vNames(vIndex) = InputBox("Enter a Name")
[code]....
I have a DatagridView control. I have 4 columns. What I want to do is allow the user to add rows and enter data into the grid and then click a button and save the data in the Gridview to a table. I can't find any information on how to do this
View 4 Replieshow to check if the user enter alphabet in textbox the only allow in that textbox is number
i think i will use ascii there like in vb 6.. but i dont know how to done in VB 2008..?
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 RepliesIn reading various answers regarding "masked TextBox Control, am I to assume that the masked textBox control uses a mask to determine what characters the user can enter into the control?
View 1 RepliesThe user can enter text into the system but I want to detect if the previous string entered is the same as the next string entered. if it is an error message or something will appear.
View 4 RepliesWhen I use this code to open a new form, My maskedtextbox on the new form can't allow the user user t enter any text. This has slowed me down a bit.
Dim F2 As New FrmStudentRegistration()
F2.TopLevel = False
Controls.Add(F2)
F2.Show()
I just want to alert when user hit "enter" key.
I tried this one in keyup event,
If e.KeyCode = Keys.Enter Then
MsgBox("msg")
End If
It didnt work, is that wrong ?
If IsNumeric(Hundreds.Text) Then
HundredsTotal.Text = (CDec(Hundreds.Text) * 100).ToString("##,##0.00")
DollarAmtVar = CDec(HundredsTotal.Text)
[CODE]..
The above code is from a small program I have written. This test is done on about 30 textboxes I am using for the user to enter number.
The following is the sub routine that is called.
Sub ShowError()
MessageBox.Show(BoxName & " must be a number.")
End Sub
Here is what I want to do but it won't work.
BoxName.Select()
This is so I can put the focus on the different boxes that might contain an error.
I'm looking for what will allow the user to be able to use the Enter key to exit a TextBox control.
View 5 RepliesI'm trying to figure out how to prompt a user to enter a captcha. Some programs out there have a little popup with the captcha image and a textbox, the user then enters the characters from the image and the captcha is solved by the user of the application. When I try to request the image directly, it gives me a different image than the one currently in the webbrowser control. Any ideas how I can create the pop up of this captcha image for the user to enter?
Note : . I'm looking for a way to prompt the user to enter a captcha from website.
I have an autocomplete textbox in vb.net. It is working fine, but now I need to pop up the window again when the user hits enter or double clicks. So far, I know that when the user hits enter, the keydown event raises with e.kecode = 13. I guess my code would go here. My problem is how do I tell autocomplete to start again after the user hits enter??
View 11 Repliesi am making my final year project in vb.net for data entry i want to make the project more user friendly i use code to change the control focus by pressing 'Enter'(ASCII 13).. and clear the content of current control by pressing 'Esc'(ASCII 27)... in my project one form contains at-least 300 of controls say(t1,t2,t3,t4...)
so in the keypress event of t1 i have writen
if asc(e.keychar)=13 then
t2.focus
elseif asc(e.keychar)=27 then
t1.text=nothing
end if
the code works fine but produce an alert beep when i press ENTER to change the active control...
The situation: I have a datagridview with one column (col1). In the datagrid definition (design view), i have created this row, and set the formatting to C2 (or C0, or C - I tried them all). then, I load my datagrid view pro programmatically :
dbl_myValue as double
dbl_myValue = 6.99
datagridview1.item(0,0) =
dbl_myValue
The datagridView shows the data correctly : 6.99$. When I "spy" on the datagridview.item(0,0), the "Value" property is a Double.
the problem: It don't work if the user manually enter a value : click in the cell, enter a numeric value (let's say 100, without decimal to avoid complexity) and then LEAVE the cell (so no more in EDIT mode). The formating just don't applies. When I "spy" on the datagridview.item(0,0), the "value" property is a STRING. So I guess this is the problem, but how can i do?
I want to limit and verify the textboxes data which enter by the user i want to make a class in which i pass the textfield and the methods in that class return boolean value . First method check only numbers with decimal point. second method check only A to Z or a to z with some specify charecters. In java it is very easy by the parse INt methods or use class.
View 3 RepliesI have a gridview and a LinkButton which is not in the gridView. What I need to to is, when the user clicks the LinkButton AddNewRecord, the gridview allows the user to enter the new data. I know this is possible (and easier) using FormView, but I need to to using the GridView. Does anyone know if this is possible, and, if so, how I can do it?
View 1 RepliesI want to format my textboxes in such a way that when someone fills in the details in the textbox if they press enter button on the keybord the focus is given to the next textbox that they should fill in .I tried the code below that we used in vb6 but its not working.
View 3 Replies