Saturday 16 December 2017

C++ Program to Create Facebook Login Screen

C++ program to create Facebook Login screen
























Actually this program doesn’t creates a Facebook login screen. I have just used graphics to create two boxes with an option to enter username and password. This is program is to just give you an idea that how you can create a login screen for your project.

#include<conio.h>
#include<iostream.h>
#include<graphics.h>
#include<stdio.h>
#include<dos.h>
#include<process.h>


void logo()
{
int gdriver=DETECT,gmode;
initgraph(&gdriver,&gmode,”c:\tc\bgi”);
rectangle(250,30,387,48);
rectangle(275,143,398,160);
rectangle(275,175,398,192);


}


void main()
{
clrscr();
char u[20],p[20];
logo();
gotoxy(34,3);
cout<<“Facebook Login”;


gotoxy(25,10);
cout<<“Username:”;


gotoxy(25,12);
cout<<“Password:”;


gotoxy(51,10);
cout<<“(Press enter after entering)”;


gotoxy(51,12);
cout<<“(8 characters only)”;

 gotoxy(36,10);

gets(u);


gotoxy(36,12);
for(int i=0;i<8;++i)
{
p[i]=getch();
if(p[i]==’b’)
  {
    printf(“b b”);
i=i-2;
  }
  else
   cout<<“*”;
}
p[i]=’’;
getch();




gotoxy(20,20);
cout<<“Plz wait Redirecting”;
for(int j=0;j<8;++j)
{
sleep(1);
cout<<“.”;
}
}

0 comments:

Post a Comment

Tech UOG