Skip to main content

How to make a Calculator -(Part-2)


Calculator  - Visual Basic 2008 / 2010
Page 2
Let's add the rest of the buttons to the form.
Important: please add the button in the same order exactly as shown below.

Add four buttons. Start by adding the button on the left (1) then (2) then (3) then (4)
Change the text of the four buttons to 7 , 8, 9, / as shown above.
Add four more buttons and change their text to 4, 5, 6, *
Remember to start adding the buttons in order as the following image:
                       
Add four more buttons in the same order as shown below and change their text to 1, 2, 3, -
                                                   

Add four more buttons in the same order as shown below and change their text to 0, . , =, +

Add the last two buttons to the calculator in order as shown below and change their text to Clear, Exit:
Add the last two buttons to the calculator in order as shown below and change their text to Clear, Exit:
                                                      





Comments

Popular posts from this blog

C Program01 Chap01: Area of Squre

/*Prime.Chapter_01/17 Write a program for Area of Squre*/   //document #include<stdio.h>    //Header file #include<conio.h>   //Header file Preprocessor Directive #define N 10        //Symbolic constant     void main()     //main program starts {     int area;       //variable declaration     area = N*N;     //process stmt      printf("Area of square:\n"); // o/p stmt     printf("%d", area);            // to show the output visible     getch();     return 0; }   // Program ends.

Create a Stopwatch of using Visual Basic2010

Create a Stopwatch  - Visual Basic  2010 Part-01 This tutorial will show you how to make a stopwatch: Click on Project next to Create: Click on Windows Form Application, and name the project "Your name's Stopwatch" and then click Ok.                                            You can change the form text to "your name's stopwatch". Click on the form and then go to properties window, then change the text property. You also need to disable the maximize control of the form. That's because you don't want the user to maximize the stop watch. Go to the properties window, and change the maximize box property to False:                                                  ...

Program_function_02

Adding two Integer number using Function. /* Adding two Integer number using Function.*/  #include <stdio.h> int sum( int x, int y); /* function prototype */ int sub( int x, int y); int mul( int x, int y); int div( int x, int y);  /* function main begins program execution */  void main( )  {     sum (5,7);     sub (10,5);     mul (10,5);     div (10,5);  } /* end main */ /* Function maximum definition */ /* x, y and z are parameters */ int sum( int x, int y) {     printf ("%d", x+y);     getch(); } /* end function maximum */ int sub( int x, int y) {     printf ("%d", x-y);     getch(); } int mul( int x, int y) {     printf ("%d", x*y);     getch(); } int div( int x, int y) {     printf (...