Professional Documents
Culture Documents
Output:
1|Page
//gd=DETECT or gd=0
initgraph(&gd,&gm,"c:\\tc\\bgi");
showmouseptr();
while(!kbhit())
{
getmousepos(&button,&x,&y);
if(button==1)
{
2|Page
button= -1;
printf("X=%d y=%d",x,y);
}
}
getch();
return 0;
}
Output:
3|Page
Show mouse pointer and get position using left and right
key of mouse
#include<conio.h>
#include<graphics.h>
#include<dos.h>
5|Page
Show undercoat
#include<conio.h>
#include<graphics.h>
#include<dos.h>
6|Page
{
button=-1;
7|Page
}
}
getch();
return 0;
}
Output:
8|Page
9|Page
First TC or any place on make new folder. Suppose we make TC inside new folder name is snapshot.
Now captur.jpg image open then picture save in black and white.
10 | P a g e