google search

Popular Posts


Welcome to BCA Notes

>>>>>>>>>>>>>>>>

Visitors

Search This Blog

Blogger templates

Visitor Map


Friday 5 June 2015

Create a Program to change background colour USING setbkcolour function in cpp?

Create a Program to change  background colour USING setbkcolour function in cpp?

#include<stdio.h>

#include<conio.h>

#include<graphics.h>

#include<iostream.h>

int main()

{

   int gd=DETECT,gm;

   //graphic construct is DETECT

   initgraph(&gd,&gm,"c:\\TurboC3\\BGI\\");

   //init graph has three parameter graphic driver graphic mode,bgi graphic path

setbkcolor(10);

   clrscr();

   //                 clear screen

   int x,y,x1,y1;

   cout<<"Enter x,y,x1,y1"<<endl;

   cin>>x>>y>>x1>>y1;

   line(x,y,x1,y1);

   //line(x,y,x1,y1)

      getch();

   closegraph();

   //closegraph();

     return(0);

}




1 comments:

  1. GIMP is one of the most popular photo-editing programmes for computers. It is, nonetheless, very similar to Photoshop. I give site web design services usa, which simplifies the process of changing the backdrop. You can utilise its bucket fill tool to add a basic colour to the image backdrop.

    ReplyDelete