Working On A Small Calculator/
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
ADVERTISEMENT
Mar 29, 2010
I have a small installment calculator assignment, I have only used VB6 before but i am required to use .NET (using Visual Basic 2008 Express).
There are four fields:
1. Loan Amount (10,000.00 - 250,000.00)
2. Loan Term (5 -25 years)
3. Loan Interest Rate ( Input to 2 decimial places)
4. Payment Frequency (12, 4, 2, 1)
I need to calculate an Effective Rate as:[code...]
Then calculate an Installment Amount:[code..]
And finally display installment amount on the form.This is the code I have so far, but I am getting a NaN result for the InstAmt[code..]
View 3 Replies
Mar 29, 2010
I have a small installment calculator assignment, I have only used VB6 before but i am required to use .NET (using Visual Basic 2008 Express).
There are four fields:
1. Loan Amount (10,000.00 - 250,000.00)
2. Loan Term (5 -25 years)
3. Loan Interest Rate ( Input to 2 decimial places)
4. Payment Frequency (12, 4, 2, 1)
I need to calculate an Effective Rate as:
CODE;
Then calculate an Installment Amount:
CODE:
Where:
CODE:
And finally display installment amount on the form.
This is the code I have so far, but I am getting a NaN result!
CODE:
View 3 Replies
Nov 4, 2011
I can't get the loop to work.
View 1 Replies
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
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
Feb 13, 2011
I'm trying to make a small video-player in Vb.net with WPF.
Got everything working beside 2 things:
Mkv-files and subtitles,.
I've installed FFDShow.
I've read that if you install it to WMP, then it will automatically work to MediaElement. It did work first, but then i had DivX installed, when i uninstall'd DivX, it stopped working.
View 1 Replies
Aug 27, 2010
I need to make a small programm for ticketing on a parking for a small hotel.So i have 2 Printers pariking In (for delivery of the tickets) and 2 Readers PArking Out.Both Printers and REaders are working Serial.So i need to poll the serial ports of the printers and readers every second.The data is stored on a SQL database so i need to read and write in the database.Can i do this with 1 PC and 1 programm or 1 PC and 4 programms that are runnning at the same time ?
View 2 Replies
Feb 1, 2010
On form 1 , i have a number of buttons that open up different websites.What i want to do is when i click a button on form 1 , i want forum 2 to show ( Form2.show() ) , Form 2 will have a list (Buttons) of internet browsers.
View 4 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
Apr 21, 2012
I am looking for some sort of message box that occurs at the cursor. Essentially, when I scroll over a label, I want abit of information to display about that label. Once the cursor moves away from the label, the box dissapears. Its like when you hover over a link, this white box appears and dissapears once you move your mouse. What is it called?
View 1 Replies
Aug 11, 2011
When I add areas to mschart ,chart is printed in smaller size.
View 4 Replies
Mar 16, 2009
I'm having trouble getting started with this application I need to do. Here are the details:
Its an application to calculate student grades for a group project. Create a text file to store names of 5 students, line by line. In a separate file enter peer evaluations from 0 to 1.0. Enter these numbers for evaluations:
1.0, 0.8, 0.9, 1.0, 0.6
0.2, 0.9, 0.5, 0.6, 0.7
0.5, 1.0, 1.0, 1.5, 0.9
0.9, 0.9, 0.9, 1.0, 1.0
1.0, 0.9, 1.0, 0.8, 0.9
This means that student 1 gave 1.0 evaluation for himself , 0.8 for student 2, 0.9 for student 3 etc.Student 2 gave 0.2 for student 1, 0.9 for him- herself, 0.5 for student 3 etc. Read these into a 2-dimensional array. If any of the values is greater than 1.0, set them to 1.0. The program should calculate the average evaluation for a student. While doing so, the program should ignore evaluations that student gave to him-herself. Populate a list box with student names when the form loads. The user should enter a project grade (same for everyone) in a textbox. Then the user can select a student from a list and click �Calculate� button. The program should display the project grade for that student by multiplying average evaluation by the grade for the whole group (project grade).
View 13 Replies
Feb 15, 2012
What I'm trying to do its a small application to convert *.dat files to AVI this is an in house format that we use.I already accomplish listing a folder content in this case *.dat files, this seams to be working fine where I'm a little bit stuck is trying to call a dos program from the Convert button (Button2) what I need to be able to is to pick one of the *.dat files on the ListBox1 click on the button and voila the file is converted.this is how the little think looks[URL]..the dos program would actually be in c:videoserver and the program name is videoconsole.exe and this command needs an argument /f:
[Code]...
View 2 Replies
Feb 29, 2012
I would like to create a small pop form for my windows application that serves to greet clients that log onto the system can anyone point me in the right direction as to where I can come up with that informationIf you think it you can achieve it
View 1 Replies
Jun 23, 2011
bit is use for boolean where it is use to define result either 1 or 0 / true or false.
how to set it, if i want to define result either in or out/ yes or no/ big or small..
can i change it??what is the code to set it..
View 13 Replies
Oct 6, 2009
I have my software installed on numerous machines and on all but one it is fine, however on this final computer the font comes up very small. It is only in my software, nothing else on the computer. I'm using Arial size 10 and bold, nothing fancy and as i say it works on all the others.
View 2 Replies
Jan 21, 2010
I want to put undo in a small program
View 10 Replies
Oct 18, 2010
I recently asked a question about translating a code sample I found on on the internet from C# into VB and I was given links to websites that automate code translation [URL].. I am very new to VB and unfortunately the VB that the translators returned doesn't compile in Visual Studio 2010. I am hoping someone can help me fix the non-working portion of VB code.
Here is the C# code I am converting into VB:
[Code]...
View 2 Replies
Mar 18, 2012
I have been working on a small program that I wish to eventually use to transfer small files over a LAN. I read the following article to get the basic concept of how to make a tcp/ip connection between computers. url... However my aim is to check the IP of the pending TCPClient before accepting it. My current code is below.[code]
View 1 Replies
Apr 29, 2012
When I try and run the program I get an error stating
"Value was either too large or too small for a Decimal."
On the line that says
principal = payment - InterestPaid
I've included the rest of the code as well. Perhaps this is a downside of staring at the screen for so long.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim payment As Double
Dim result As String
'declarations
[Code] .....
View 4 Replies
Jun 1, 2009
I have writen a program in Visual Studio 2005 professional. Part of the program functions is to store customers details. Part of this details include a phone number. I can add a customer and include his/her telephone no. which is 12 digits long. But when retreiving this customer I get the following error.Value was either too large or too small for an Int32. Couldn't store <+23320805060> in Phone Column.Expected type is Int32.The program runs fine If the phone numer is less than or = 9 digits. The datatype i am using is for the phone column is varchar(50). I have tried to change the data type to bigint, int and nvarchar(50) but the problem seems to persist. I am using the SQL database but i seem to be hitting a brick wall on this matter.
View 10 Replies
Dec 2, 2009
How would I take a small bitmap using this code
Dim img As New Bitmap(, )
I want the bitmap to be basically 100x100 and a screen of the center screen.
View 1 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