Professional Documents
Culture Documents
Microsoft Visual
Studio 2010 Visual Basic
calculator
This is not an easy project!!! Please listen carefully
& follow these instructions EXACTLY!
1. Open Microsoft Visual Studio 2010.
Select Visual Basic Development Settings.
Now, select Start Visual Studio.
Windows
Click on Windows Forms
Application.
Rename this as Calculator.
IMPORTANT!!!
Create a new folder in your
Student folder in My Documents.
Rename it as Calculator.
Form
MS Access
Solution
Explorer
all
files project
Select Debug,
Options and Settings.
IF
Toolbox not
showing
View
Toolbox
triangle icon
Dock
lock
toolbox
position
NOT user-friendly
Calculator
GRAPHICAL USER
INTERFACE GUI
Form
2 Panels
2 Text Boxes
1 Label
4 Buttons
Form
size
properties each
3. Click on Panel 1.
Panel 1 FILL all top
Form
Select Dock.
Click on the top box.
Panel 2
FILL all middle
Form
Select Dock.
Form
resize Form
resize box
Click here.
Change the Width to 130.
Change the Height to 30.
Choose a Background
colour.
Font Size
big
calculator
user-friendly
Choose a colour for your Font.
repeat Step 4
Text Box 2
5. Click on Label 1.
Delete Label1.
Click here.
Change the Width to
150.
Change the Height to 35.
Change the Background
colour.
Font Size
big
calculator
user-friendly
Click here.
Click on Text.
Rename the Button as +.
Background
You can use colour.
OR
You can use a
Background image.
Remember!
picture
NOT look OK
edit size
Photoshop
Background
Image settings
OR
If you need,
change the
Image Align
settings.
Warning!
cannot edit size GIF animation
edit size stop working
Change Flat Style to
Popup.
Font Size
big
calculator
user-friendly
Play button
repeat Step 6 Button 2 Button 3 Button 4
rename each
button
- x
8. Click on Panel 1.
Click here.
Import your picture.
Warning!
Click
here.
Import your
GIF
animation.
Click here.
Right click.
Dock
Fill
Picture
Boxes
blank spaces
calculator pictures
GIF animation
enough
space Form
bigger
*** Remember!
GIF animations ONLY
Image NOT Background
Image
Form
Visual Basic code
commands real
calculator
easy understand
+
button code
here
Button
+ Button
number VALUE
Label1 = number VALUE
TextBox1 + number
VALUE TextBox2
Label1.Text =
Val(TextBox1.Text) +
Val(TextBox2.Text)
Textbox 1 Textbox
2 Label 1
***
.Text
error
format Clear
button
format Square
button
format Square
Root button
Calendar
more space
buttons
basic
calculator
NOTE: Square
Square Root buttons
ONLY number
Textbox 1
number
Textbox 2
ERROR
Why?
ONLY
code Textbox 1
NOT Textbox 2
HUGE
Textbox 1 OR Textbox 2
square square root numbers
IF command
install
double
click Application file
Select Build,
Configuration Manager.
Change this to Release.
Click Close.
Now, select Build,
Build Calculator.
application file
Go into your
Folder in Drive
D.
Find this.
OK