Numeric Keypad Not Working With Calculator
May 11, 2010
I am having trouble getting the numeric keypad on my keyboard to work with my calculator. btn0 - btn9 are working, but the numeric keys +,_,*,/ are not working. They input the sign into the text box instead of clicking the button associated with the function on the calculator. I would like to be able to use the calculator as a 10 key adding machine of sorts. [Code]
View 5 Replies
ADVERTISEMENT
Aug 26, 2009
I am running a VB app that I developed in Visual Studio 2008. This app runs on an XP machine with a touch screen without a keyboard plugged in. I would like to add a popup numeric keypad for the user when a data field is touched. Can anyone tell me what is needed to create the keypad?
View 2 Replies
May 2, 2010
I am trying to create a calculator, which can accept numeric keyboard imput, as well as button clicks, and display the number in a label.
Why does the numeric keyboard input work in this instance
Public Class Form1
Sub Form1_KeyPress(ByVal sender As Object, _
ByVal e As KeyPressEventArgs) Handles Me.KeyPress
[Code].....
Even if I press a keyboard number before pressing the button(so there is no need to clear the label if the button is pressed first etc), the number is not displayed in the label. And even if I completely comment out the code for the button-click, the keypress event still does not display the number in the label. It is as if just having the code for the button completely disables the keypress.
View 4 Replies
May 16, 2009
Description of Program/Events. I would like to come up with a number generator that takes the Total number (for this example I'll say 20), divides it by 2, and does alternating additions so the end result will generate a list like this:
1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19, 10, 20.
I can understand the arithmetic, just can't work out how to express this in code. The end result would be save in a .Txt file (I have added a SaveFileDialog1 control, but figure I need to get the result before I work on the export).
Dim StartValue As Integer
Dim EndValue As Integer
Dim TotalValue As Integer
' Convert input to numeric variables.
StartValue = Val(StartNumTextBox.Text)
[Code] .....
View 3 Replies
Jul 25, 2009
I've been browsing these forums the past couple days, and I've got most of my program figured out now, but I'm seeking advice as to where I should do a few calculations, and how I should pass my data between my input and my output forms. my basic program consists of a user entering 4 positive values on my main form - and then I calculate various constant percentages based upon these numbers. I then need to output these values into various labels on my output form. I have successfully implemented doing all of this on a single form, but I have over 30 outputs to display so it was a bit cluttered on a single form.
1) is it better to do all my calculations within the code of my input form and output the calculation results to the output form, or is it better to take my inputs, send those 4 values to the output form and do my calculations and output there? (i'm thinking it's the latter and is how i'm currently coding this)
2) in my second form, I cannot remember how to pass values between forms and I have not been able to find any examples that have jump started my brain into remembering. Currently I'm planning on sending my 4 inputs to the output form, doing the calculations, and outputting everything there.
for my input page:
Public Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click
'each textbox is programmed to only allow numerals
'Get input from user
[code]....
and i think this will have the form calculate everything when it loads up. I'll later add code so that after I close it - I'll have my input form reset so i can immediately run another set of calculations. (currently not programed, i need to get the basics up first)
View 4 Replies
Nov 4, 2011
I can't get the loop to work.
View 1 Replies
Apr 17, 2012
I am trying to check if a string is numeric but in vain. here is my code:
If Val(fnumField.Text.Trim) > 0 Or fnumField.Text.Trim = "0" Or Val(phnField.Text.Trim) > 0 Or phnField.Text.Trim = "0" Or Val(ophnField.Text.Trim) > 0 Or _
ophnField.Text.Trim = "0" Or Val(treeField.Text.Trim) > 0 Or treeField.Text.Trim = "0" Then
[code].....
View 1 Replies
Jul 11, 2011
All i made was a program to launch diffrent programs ^^. This is what I am currencly workin on: A calculator to calculate waves for example Wintermaul. I have writen this code:
[Code]...
View 1 Replies
Sep 14, 2011
I am slowly learning to program in visual basic and just spent the past 5 hours trying to fix this but just cant.
View 8 Replies
Nov 4, 2010
I need to write some values from a keypad.If I write on the keypad's code the specific textbox where the value has to be written, there is no problem, but as I have many differents text box, I'd like to have something more general.What I'd like the keypad to do is to modify a global variable, so when I press the OK button on the keypad (to validate the number) this variable is refreshed and written on the right text box (on the text box in the form which called the keypad).As the form which contains the text box is already open (the keypad is just a pop-up form) I can't managed to refresh the text box and it remains with the same value as when I opened that form.
View 3 Replies
Aug 10, 2009
I am creating a Point of Sale software for a small company I work for. I am a beginner with Visual Studio and have just stumbled my way around. I have completed the GUI and would like to start assigning code. The problem I am having is assigning numbers to a keypad on the screen. I would like each button to represent numbers like on a calulator of keypad. When these are pressed they need to input into TextBox2.
View 6 Replies
Apr 12, 2012
I have some problems with coding my visual keypad in order to input a value when the selected textbox has focus.With the code below makes the value I chose in all the textboxes.
Here the code:
'Number pad section------------------------------------------------
'Number 1
Private Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click
[code]....
View 4 Replies
Apr 6, 2012
Is there a numeric text box, not an up-down box, a SIMPLE numeric box into which the user can place a number, 5 boxes actually, then on command have the five boxes added and the sum displayed?
View 8 Replies
Dec 5, 2009
What i really want is to send the keypad number not 7 but "NumPad7". i dont know how to do that from sendkeys
View 6 Replies
Jan 22, 2010
I am reading a data file and storing them in an array of string.Data is random, could be like "1","2","133,18" but sometimes there can be missing values like "?".Once I load the data in the array, I want to check if at least a majority (like 60% of them) are numeric values.If yes, then I wanna track down the higher and lowest value in the array, and output a range of 5.Loop through the array
If 60% of them are numbers (integers or decimals) then find highest value, find lowest value end if produce range
If for example lowest = 1 and highest = 100, range of 5 means 0,20,40,60,80,100 (so 5 ranges are 0-20, 20-40, 40-60, 60-80, 80-100).Also if the ranges turn to have decimals due to weird numbers, I would like to round them up.My problem is, in order to find highest and lowest when there are non numeric values in the array like "?", how should I handle those? I was thinking of something like Double.NaN but I would have to have an array of doubles.
View 3 Replies
Sep 3, 2009
I found on msdn samples and modified (add Thread.GetDomaind.UnhandledException)
<SecurityPermission(SecurityAction.Demand, Flags:=SecurityPermissionFlag.ControlAppDomain)> _
Public Sub Main()
' Add the event handler for handling UI thread exceptions to the event.[code].....
View 1 Replies
Jun 18, 2009
It appears that my favorite thing in the world is tackling projects that are beyond my current knowledge and abilities. I have a little project that I am working on which is a simple image viewer stocked with (upon completion) your standard Load..., Next/Previous, Zoom In/Out, Actual Size, and Full Screen capabilities. However, I am running into a few snags:
(1) I've been able to get my "Load..." button to display a file dialog box, but I cannot seem to get a working filter (with which only image file types are allowed to be selected) in working order.
(2) I have a PictureBox object (entitled PictureBox1) that displays the image selected via the file dialog box, but it loads images in their full size (1:1/100% zoomed) state without scrollbars, etc. to allow me to navigate the loaded image. I would like to have it load the image, initially, to fit within the dimensions of PictureBox1 and from there be able to zoom in/out via my "Zoom In/Out" and "Actual Size" buttons and be able to scroll if the zoom level is beyond the dimensions of PictureBox1.
(3) It dawned on me that I haven't the faintest idea how to get my "Next/Previous" buttons to allow the user (me) to navigate, in succession, the images contained in the folder in which the currently loaded image is stored. [code]
If it is deemed that this thread is inappropriately requesting help, I ask that it be locked/deleted quickly as I recognize that this is a large community with many discussions going without need of unwelcome posts.
View 9 Replies
Mar 11, 2009
My firts issue is that I have a combo box, with a list of words, now I want to set a numeric value to each one.
In a little more detail. I have am looking to create a cost sheet, where, I select an item or items form a combo box and then they are automatically added up by this program I am hoping to design.
Now, I need to set these numeric values, but have no Idea how to do it. The second issue is that I dont even know how to get these values to add up
View 39 Replies
Jan 22, 2010
I have this:
If (TextBox1.TextLength > 16) Then Return
But I want to add a beep to how can I do it? I mean I can only Return and I want to use Beep() too.
View 6 Replies
Jan 29, 2009
I've made a simple calculator, everything works except for the adding (+) function. Such as 3 + 4 = 34 (which it doesn't). It takes it as a string, rather than a number.
Here's what I have so far:
CODE:
Again, the problem is the adding is not functioning.
View 1 Replies
Oct 11, 2009
I am doing a tutorial for a simple calculator. My question is how can I add code to make a botton that add my tax % to the total amount I have.
Option Explicit On
Public Class Form1
Dim firstnumber As Single
[Code]......
View 1 Replies
Dec 7, 2009
The comma/dot may appear only ones. How do I modify that within this code??
bpuntingedrukt as boolean
Private Sub VoegCijferToe(ByVal sCijfer)
If Len(lblDisplay.Text) > 15 Then Exit Sub
If sCijfer = "0" And lblDisplay.Text = "0," Then
[Code] .....
View 24 Replies
Jan 11, 2011
Okay, i have two questions i will merge into one.I am using Express, just in case its important
First of all, i am trying to create a calculator using Visual Basic, which will end up being a lot like the 'Calculator' application built into all Microsoft computers.
I am having trouble however, with adding more than one thing to a text box.
[Code]...
View 13 Replies
Jun 18, 2012
i have to finished a cacluator, all my code seems to be working apart from the equals button and i do not understand why..i've tried several different things such as a case too but nothing seems to work to get the equals button working. This is my code, no need for all the buttons they are the same and ive declared variables.
[Code]...
View 2 Replies
Mar 30, 2012
Sorry in advance. I emailed myself my coding since I don't have vb on my personal computer. Sooo, the format is going to be off. But my program allows the computer to generate a random date. The user has to guess what day of the week the random date lands on. I have written the whole code. It all works except when user checks his/her answer. The answer always comes up as incorrect. Here is the coding:
[code]...
View 5 Replies
Jul 13, 2009
I want Dosage Calculator in c#.net for my module completion.
View 2 Replies
Dec 17, 2009
I want to build a calculator, i want to learn vb.net myself so i contacted you.
View 2 Replies
Apr 3, 2009
how to code the calculator?
View 2 Replies
Jun 22, 2010
How can i design a calculator?
View 2 Replies
Nov 26, 2009
does anyone know what i need to do? if you do make a youtube video and post it in this post.
View 1 Replies