Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 535 Vote(s) - 3.47 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create a basic Calculator in Visual Basics

#1
Today I am going to show all you newbies to the coding world how to make a Calculator in Visual Basics, to do this tutorial I will be using Visual Studio 2013.
Alright lets get started on this. I have done what I can to make this easy to follow.

Step One
You will want to create a new project and title it what ever you want, for this I have called it "Calculator".
You will also want to make sure on Visual Studio that both Common Controls (appears on left) and Properties (appears on right) show up on the screen.
Once you start a new project this will appear in your Form (middle)

[Image: UoROm0r.png]

Step Two
We will now add button's, textbox's and a label to the program so people know what the program is for.
Here is an example of what it should look like.

[Image: P5khZ6H.png]

Remember to title all of your labels, textboxes and buttons.
To name them you simply Click the thing you want to name > Go to properties > Design > (Name)
to change the display text from "label" to anything simply Click the thing you want to name > Go to properties > Apperance > Text

lbl - Label
btn - Button
txt - TextBox

Here is what I called all of mine,

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Now go back to the part that should be named "Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click" and add the following code.
Always make sure you code is between "Private Sub" after all that text click enter and when done the code make sure "End Sub" is after your code.

Add


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Once that is done you just change the + Simble on each button (subtract etc) but make sure you go back to the design (program display) and double click on each button to add it.

Subtract


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Multiply


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Divide


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Squareroot is not as easy as the others, you can look on the web for the code but here it is anyways.

Squareroot


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Here is the code for the clear button, really simpe and easy to follow, double click the button and add the following.


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Step Four
If you are lazy and simply want to add the buttons and name them exactly as I did then here is the full code!


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Step Five
Time to test the program to make sure there is no errors, here is a video I made of me testing it.




This program is nowhere near complete nor tested for bugs etc.
It is made to show people how easy it can be to make these programs.[/hide]
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through