Posts

Write a visual Basic Program to show tool bar

Image
Designing Window :- First step right click on toolbox and add components it will show components popup window from it on control tab add Microsoft Windows Common Controls 6.0 (SP6) click on check box of selected items only and then click on OK button .It will show more tools like tool bar and image list on toolbox take it on form window and write the below code in coding window.                             Fig :- Design View of program for taking tool bar on form Code:- Private Sub Form_Load() Toolbar1.ImageList = ImageList1 Dim b1 As Button Set b1 = Toolbar1.Buttons.Add b1.Style = tbrDefault b1.Caption = "New" b1.Image = 1 Dim b2 As Button Set b2 = Toolbar1.Buttons.Add b2.Style = tbrDefault b2.Caption = "Open" b2.Image = 2 Dim b3 As Button Set b3 = Toolbar1.Buttons.Add b3.Style = tbrDefault b3.Caption = "Save" b3.Image = 3 Dim b4 As Button Set b4 = Toolbar1.Buttons.Add b4.Style = tb...

Write a C++ program to calculate area of circle,sphere and cylinder using base class round-shape

Create a base class round-shape(radius). define three different shapes as circle, sphere and cylinder(height) from round-shape. class round-shape { protected :float radius; public:static float pi; round-shape(float)//default argument virtual float area()=0; } Write a C++ program to calculate area of circle,sphere and cylinder #include<iostream.h> #include<conio.h> class round { protected:float radius; public:static float pi;        round(float r=0)        {        cout<<"\n Enter the radius:-";        cin>>r;        radius=r;        }        virtual float area()=0;        }; class circle:public round { public:float circle;        float area()        {   ...