Code Monkey home page Code Monkey logo

cpp-gui's Introduction

GUI

Check some Basix C++ graphic program here

  • Make Body
  
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int graphicdrive,graphicmode;
graphicdrive=DETECT;
initgraph(&graphicdrive,&graphicmode,"");
closegraph();
getch();
}
  • Arc
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"");
arc(150,150,0,180,100);
getch();
closegraph();
}
  • Circle
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"");
circle(100,100,50);
getch();
closegraph();
}
  • Color
#include<conio.h>
#include<iostream.h>
#include<graphics.h>
void main()
{
	clrscr();
	int d=DETECT,m;
	initgraph(&d,&m,"");
	setbkcolor(5);
	setcolor(1);
	settextstyle(1,0,5);
	outtextxy(75,8,"India");
	setcolor(15);
	settextstyle(1,1,15);
	outtextxy(75,40,"Gorakhpur");
	getch();
	closegraph();
}
  • Positioning
  
#include<iostream.h>
#include<conio.h>
#include<graphic.h>
void main()
{
int gd,gm;
gd=DETECT;
initgraph(&gd,&gm,"")
outtext("Priyanshu Singh");
moveto(300,300);
outtext("Position Change");
closegraph();
getch();
}
  • Rectangle
  
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"");
rectangle(50,100,200,300);
getch();
closegraph();
}
  • Triangle
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"");
line(140,290,50,450);
line(140,290,230,450);
line(50,450,230,450);
getch();
closegraph();
}
  • Pixel
#include<iostream.h>
#include<graphics.h>
#include<conio.h>
int main()
{
int gd=DETECT,gm,color;
initgraph(&gd,&gm,"");
putpixel(50,40,RED);
getch();
closegraph();
return 0;
}

Thank You

cpp-gui's People

Contributors

psingh12354 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.