Hi

Simple Calculator Program in Visual Basic

SHARE:

Simple Calculator Program in Visual Basic

Do you want to the simple calculation program in visual basic? Yes we know you want because calculator program is one of the main part in visual basic.



How to Create a Simple Calculator program in VB?


To know the simple process how to create a simple calculator program in VB just follow these steps one by one which are showing below.

Step 1: -

  • At first open Visual Basic0 application software

  • Then click on or select ‘Standard EXE’ icon from New Project dialog box

  • Then click on ‘Open’.

Step 2: -

Form Design: -

Select necessary Control Tool from Tool Box and adjust position to ‘Form Window’: -

  • Six Label Box

  • Six Text Box

  • Six Command Box
Simple Calculator Program in Visual Basic





Step 3: -

  Properties Settings: -

  • Select ‘Form1’from Form Window and select ‘Caption’ from Properties Window

  • Then replace ‘Form1’ to ‘Simple Calculator Project’ from properties window

  • Then select ‘Label1 box’ from Form Window and select ‘Caption’ from Properties Window

  • Then replace ‘Label1’ to ‘1st Number’ from Properties Window

  • Then select ‘Label 2 box’ from Form Window and select ‘Caption’ from Properties Window

  • Then replace ‘Label 2’ to ‘2nd Number’ from Properties Window

  • Then select ‘Label 3 box’ from Form Window and select ‘Caption’ from Properties Window

  • Then replace ‘Label 3’ to ‘Sum’ from Properties Window

  • Then select ‘Label 4 box’ from Form Window and select ‘Caption’ from Properties Window

  • Then replace ‘Label 4’ to ‘Subtraction’ from Properties Window

  • Then select ‘Label 5 box’ from Form Window and select ‘Caption’ from Properties Window

  • Then replace ‘Label 5’ to ‘Multiplication’ from Properties Window

  • Then select ‘Label 6 box’ from Form Window and select ‘Caption’ from Properties Window

  • Then replace ‘Label 6’ to ‘Division’ from Properties Window

  • Then select ‘Text1 box’ from Form Window and select ‘Text’ from Properties Window

  • Then remove or erase‘Text1’ from Properties Window

  • Then select ‘Text2 box’ from Form Window and select ‘Text’ from Properties Window

  • Then remove or erase‘Text2’ from Properties Window

  • Then select ‘Text3 box’ from Form Window and select ‘Text’ from Properties Window

  • Then remove or erase‘Text3’ from Properties Window

  • Then select ‘Text4 box’ from Form Window and select ‘Text’ from Properties Window

  • Then remove or erase‘Text4’ from Properties Window

  • Then select ‘Text5 box’ from Form Window and select ‘Text’ from Properties Window

  • Then remove or erase‘Text5’ from Properties Window

  • Then select ‘Text6 box’ from Form Window and select ‘Text’ from Properties Window

  • Then remove or erase‘Text6’ from Properties Window

  • Then select ‘Command1 box’ from Form Window and select ‘Caption’ from Properties Window

  • Then replace ‘Command1’ to ‘+’ from Properties Window.

  • Then select ‘Command 2 box’ from Form Window and select ‘Caption’ from Properties Window

  • Then replace ‘Command 2’ to ‘-’ from Properties Window.

  • Then select ‘Command 3 box’ from Form Window and select ‘Caption’ from Properties Window

  • Then replace ‘Command 3’ to ‘*’ from Properties Window.

  • Then select ‘Command 4 box’ from Form Window and select ‘Caption’ from Properties Window

  • Then replace ‘Command 4’ to ‘/’ from Properties Window.

  • Then select ‘Command 5 box’ from Form Window and select ‘Caption’ from Properties Window

  • Then replace ‘Command 5’ to ‘CLEAR’ from Properties Window.

  • Then select ‘Command 6 box’ from Form Window and select ‘Caption’ from Properties Window

  • Then replace ‘Command 6’ to ‘Off’ from Properties Window.














Step 4: -

Code Writing:-

  • Double click on ‘+ button’ or ‘Command 1 box’

  • Then input code to Command 1 code box

Code: - Text3.Text = Val (Text1.Text) + Val (Text2.Text)

  • Then double click on ‘- button’ or ‘Command 2 box’

  • Then input code to Command 2 code box.

Code: - Text4.Text = Val (Text1.Text) - Val (Text2.Text) 

  • Then double click on ‘* button’ or ‘Command 3 box’

  • Then input code to Command 3 code box.

Code: - Text5.Text = Val (Text1.Text) * Val (Text2.Text) 

  • Then double click on ‘/ button’ or ‘Command 4 box’

  • Then input code to Command 4 code box.

Code: - Text6.Text = Val (Text1.Text) / Val (Text2.Text)  

  • Then double click on ‘CLEAR button’ or ‘Command 5 box’

  • Then input code to Command 5 code box.

Code: - Text1.text = “”

             Text2.text = “”

             Text3.text = “”

             Text4.text = “”

             Text5.text = “”

             Text6.text = “”

  • Then double click on ‘OFF button’ or ‘Command 6 box’

  • Then input code to Command 6 code box.

Code: - End




  • Then close code box

Step 5: -

Project Save: -

  • Click on ‘Save project’ option from File menu

  • Then input any name to file name box and click on Save option from Save file as box

  • Then input any new name to file name box

  • Then click ‘Save’ option.

Step 6: -

Project Run: -

  • Press F5 key from keyboard or click on ‘Start’ from ‘Run menu’ for run the project

  • Then click on ‘+’ , ‘-’, ‘*’ and ‘/’ for display the result



  • Then click on ‘CLEAR Button’ for clear the Text1 to Text6 box.

  • Then click on ‘OFF Button’ for the close the result window

This is the simple way to create a simple calculator program in VB. Now you can easily make a simple calculator program.



COMMENTS

Name

Computer,9,MS Office,2,Visual Basic,8,
ltr
item
Computercoursestudy: Simple Calculator Program in Visual Basic
Simple Calculator Program in Visual Basic
https://4.bp.blogspot.com/-Rp8hOgQPBOo/WqEWQDTkh5I/AAAAAAAAAH0/oVrPMYvuk0oHPfIYdi4Yc8_C-V8i7lhWQCLcBGAs/s320/Simple%2BCalculator%2BProgram%2Bin%2BVisual%2BBasic.png
https://4.bp.blogspot.com/-Rp8hOgQPBOo/WqEWQDTkh5I/AAAAAAAAAH0/oVrPMYvuk0oHPfIYdi4Yc8_C-V8i7lhWQCLcBGAs/s72-c/Simple%2BCalculator%2BProgram%2Bin%2BVisual%2BBasic.png
Computercoursestudy
https://www.computercoursestudy.com/2016/12/simple-calculator-program-in-visual.html
https://www.computercoursestudy.com/
https://www.computercoursestudy.com/
https://www.computercoursestudy.com/2016/12/simple-calculator-program-in-visual.html
true
3961810787506653407
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy