Sabtu, 06 Juni 2009

coding menu bahasa c

#include
#include
#define ATAS 72
#define BAWAH 80
#define KANAN 77
#define KIRI 75
#define ESC 27
#define ENTER 13
#define ANEH 31

int x,n,m;
int key,key2,key3,key4, key5;

void keluar()
{
cleardevice();
setcolor(BLUE);
setfillstyle(1,BLUE);
bar(175,150,500,300);
setcolor(WHITE);
rectangle(173,148,502,302);
/* monitor kecil
rectangle(220,185,270,225);
rectangle(225,190,265,220);
rectangle(265,222,260,223);
rectangle(235,225,255,230);
rectangle(215,230,275,245);
rectangle(260,232,273,243);
setfillstyle(1,4);
floodfill(222,187,WHITE);
floodfill(237,228,WHITE);
floodfill(220,235,WHITE);
setfillstyle(6,YELLOW);
floodfill(263,235,WHITE);*/

setfillstyle(9,2);
floodfill(230,195,WHITE);
settextstyle(3,0,2);
setusercharsize(1.5,1,1,1.5);
outtextxy(150,75,"TUGAS AKHIR MEMBUAT PUSING ");
settextjustify(1,0);
settextstyle(2,0,2);
setusercharsize(1.5,1,1,1.5);
outtextxy(390,210,"DIBUAT OLEH: Aditya Kris Arnanda");
outtextxy(395,225,"NIM : A11.2008.03927");
outtextxy(395,239,"KELOMPOK : STI 205");
outtextxy(320,370,"Pencet Terserah Anda Jika Mau keluar ...");
getch();
closegraph();
}

void tombol(int fe)
{
setcolor(fe);
setfillstyle(1,fe);
bar(5,457,65,477);
setcolor(14);
settextjustify(0,2);
settextstyle(2,0,5);
outtextxy(18,459,"MENU");
}

void desktop()
{
cleardevice();
setbkcolor(YELLOW);
setfillstyle(1,7);
bar(4,456,638,478);
setfillstyle(1,15);
bar(593,462,634,474);
rectangle(4,456,66,478);
setcolor(16);
settextjustify(0,2);
settextstyle(2,0,5);
outtextxy(596,460,"PISS..");
tombol(8);
}



void menu()
{
/* kotak menu */
setbkcolor(BLUE);
setcolor(8);
setfillstyle(1,7);
bar(18,278,151,454);
/* kotak win */
setcolor(RED);
setfillstyle(1,WHITE);
bar(1,278,18,454);
/* tulisan Tugas STI 205*/
setcolor(GREEN);
settextjustify(1,0);
setusercharsize(1,2,1,4);
settextstyle(2,1,2);
setusercharsize(1.5,1,1,1.5);
outtextxy(6,450,"Tugas STI 205");
/* garis tepi */
setcolor(8);
line(150,279,150,454);
line(18,279,150,279);
line(18,429,150,429);
/* tulisan menu */
setcolor(BLUE);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
outtextxy(20,440,"KELUAR");
outtextxy(20,410,"Input");
outtextxy(20,380,"Cari >>");
outtextxy(20,350,"Ubah >>");
outtextxy(20,320,"Hapus >>");
outtextxy(20,290,"Urutkan >>");
}

void terang(int n)
{
setcolor(BLUE);
setfillstyle(1,9);
bar(19,431-(30*n),148,453-(30*n));
setcolor(14);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
if(n==0) outtextxy(20,440,"KELUAR");
if(n==1) outtextxy(20,410,"Input");
if(n==2) outtextxy(20,380,"Cari þ");
if(n==3) outtextxy(20,350,"Ubah þ");
if(n==4) outtextxy(20,320,"Hapus þ");
if(n==5) outtextxy(20,290,"Urutkan þ");
}

void padang1(int m)
{
setcolor(BLUE);
setfillstyle(1,9);
bar(155,303-(30*m),316,285-(30*m));
setcolor(14);
settextjustify(0,1);settextstyle(1,0,1);
setusercharsize(1,2,1,3);
if(m==0) outtextxy(165,290-(30*m),"Sesuai Nama");
if(m==1) outtextxy(165,290-(30*m),"Sesuai Nim ");
if(m==2) outtextxy(165,290-(30*m),"Sesuai Jadwal");
if(m==3) outtextxy(165,290-(30*m),"Sesuai Email");
if(m==4) outtextxy(165,290-(30*m),"SesuaiID");
if(m==5) outtextxy(165,290-(30*m),"Sesuai Kelas");
if(m==6) outtextxy(165,290-(30*m),"Sesuai Jurusan þ");
if(m==7) outtextxy(165,290-(30*m),"Sesuai Progdi þ");
}



void padang2(int m)
{
setcolor(BLUE);
setfillstyle(1,9);
bar(154,392-(30*m),300,370-(30*m));
setcolor(14);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
if(m==0) outtextxy(165,380-(30*m),"Nim");
if(m==1) outtextxy(165,380-(30*m),"Nama");
if(m==2) outtextxy(165,380-(30*m),"Kelas");
}
void padang3(int m)
{
setcolor(BLUE);
setfillstyle(1,9);
bar(154,364-(30*m),317,342-(30*m));
setcolor(14);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
if(m==0) outtextxy(165,350-(30*m),"Ubah Email");
if(m==1) outtextxy(165,350-(30*m),"Ubah Nama");
if(m==2) outtextxy(165,350-(30*m),"Ubah kelas");
}
void padang4(int x)
{
setcolor(BLUE);
setfillstyle(1,9);
bar(322,74+(30*x),467,100+(30*x));
setcolor(14);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
if(x==0) outtextxy(340,80,"TI");
if(x==1) outtextxy(340,110,"SI");
if(x==2) outtextxy(340,140,"MI");
if(x==3) outtextxy(340,170,"DKV");
}

void padang5(int x)
{
setcolor(BLUE);
setfillstyle(1,9);
bar(322,105+(30*x),468,130+(30*x));
setcolor(14);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
if(x==0) outtextxy(340,110,"D3");
if(x==1) outtextxy(340,140,"S1");
if(x==2) outtextxy(340,170,"S2");
}

void menu_program()
{
setfillstyle(1,7);
bar(152,72,319,306);
setcolor(8);
rectangle(153,73,318,305);
setcolor(BLUE);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
outtextxy(165,290,"Sesuai Nama");
outtextxy(165,260,"Sesuai Nim");
outtextxy(165,230,"Sesuai Jadwal");
outtextxy(165,200,"Sesuai Email");
outtextxy(165,170,"Sesuai ID");
outtextxy(165,140,"Sesuai Kelas");
outtextxy(165,110,"Sesui Jurusan >>");
outtextxy(165,80,"Sesuai Progdi >>");
}

void menu_access()
{
setfillstyle(1,7);
bar(319,72,470,192);
setcolor(8);
rectangle(320,73,469,191);
setcolor(BLUE);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
outtextxy(340,170,"TI");
outtextxy(340,140,"SI");
outtextxy(340,110,"MI");
outtextxy(340,80,"DKV");
}

void menu_startup()
{
setfillstyle(1,7);
bar(319,101,470,192);
setcolor(8);
rectangle(320,102,469,191);
setcolor(BLUE);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
outtextxy(340,110,"D3");
outtextxy(340,140,"S1");
outtextxy(340,170,"S2");
}
void pilih_dokumen()
{
do
{
setcolor(9);
setfillstyle(1,7);
bar(150,339,301,310);
setcolor(8);
setfillstyle(1,8);
rectangle(151,338,300,311);
setfillstyle(1,9);
bar(153,336,298,313);
setcolor(BLUE);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
outtextxy(190,320,"Semua FILE");
}
while(getch()!=75);
setfillstyle(1,BLACK);
bar(150,339,301,309);
}

void menu_setting()
{
setcolor(9);
setfillstyle(1,7);
bar(151,368,320,279);
setcolor(8);
rectangle(152,366,319,280);
setcolor(BLUE);
settextjustify(0,1);settextstyle(1,0,1);
setusercharsize(1,2,1,3);
outtextxy(165,350,"Ubah Email");
outtextxy(165,320,"Ubah Nama");
outtextxy(165,290,"Ubah Kelas");
}

void menu_search()
{
setcolor(LIGHTGRAY);
setfillstyle(1,7);
bar(151,306,303,395);
setcolor(8);
rectangle(152,307,302,394);
setcolor(BLUE);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
outtextxy(165,380,"Nim");
outtextxy(165,350,"Nama");
outtextxy(165,320,"Kelas");
}

void fe_access()
{
x=0;
do
{
menu_access();
padang4(x);
key4=getch();
if(key4==ATAS) { if(x<0)>0) x--; }
if(key4==BAWAH) { if(x<3)>3) x--; }
}
while(!(key4==ESC||key4==KIRI));
setfillstyle(1,BLACK);
bar(319,72,470,192);
}

void fe_startup()
{
x=0;
do
{
menu_startup();
padang5(x);
key4=getch();
if(key4==ATAS) { if(x<0)>0) x--; }
if(key4==BAWAH) { if(x<2)>2) x--; }
}
while(!(key4==ESC||key4==KIRI));
setfillstyle(1,BLACK);
bar(319,101,470,192);
}

void program()
{
m=0;
do
{
menu_program();
padang1(m);
key3=getch();
if(key3==BAWAH) { if(m<0)>0) m--; }
if(key3==ATAS) { if(m<7)>7) m--; }
if(key3==ENTER||key3==KANAN)
{
if(m==7) fe_access();
if(m==6) fe_startup();
}
}
while(!(key3==ESC||key3==KIRI));
setfillstyle(1,BLACK);
bar(150,309,321,69);
}



void pilih_setting()
{
m=0;
do
{
menu_setting();
padang3(m);
key3=getch();
if(key3==BAWAH) { if(m<0)>0) m--; }
if(key3==ATAS) { if(m<2)>2) m--; }
}
while(!(key3==ESC||key3==KIRI));
setfillstyle(1,BLACK);
bar(150,369,321,279);
}

void pilih_search()
{
m=0;
do
{
menu_search();
padang2(m);
key3=getch();
if(key3==BAWAH) { if(m<0)>0) m--; }
if(key3==ATAS) { if(m<2)>2) m--; }
}
while(!(key3==ESC||key3==KIRI));
setfillstyle(1,BLACK);
bar(150,300,303,410);
}

void run()
{
do{
cleardevice();
desktop();
tombol(8);
setfillstyle(1,7);
bar(10,350,225,450);
setfillstyle(1,1);
bar(10,350,225,370);
rectangle(70,415,99,435);
rectangle(102,415,158,435);
rectangle(163,415,215,435);
setfillstyle(1,15);
bar(50,398,200,410);
settextjustify(0,2);
settextstyle(2,0,5);
outtextxy(13,352,"ÛÛ input..."); /* ascii 219 */
setcolor(16);
settextstyle(2,0,4);
outtextxy(13,372,"ÛÛ Tulislah Nama Anda.");
outtextxy(13,398,"Tulis");
outtextxy(80,420,"OK");
outtextxy(113,420,"Batal");
outtextxy(173,420,"CARI");
key5=getch();
}
while(key5!=ESC);
setfillstyle(1,BLACK);
bar(10,350,225,450);
}


void fe_menu()
{
n=0;
do{
menu();terang(n);
key2=getch();
if(key2==BAWAH) { if(n<0)>0) n--; }
if(key2==ATAS) { if(n<5)>5) n--; }
if(key2==KANAN||key2==ENTER)
{
if(n==0) keluar();
if(n==1) run();
if(n==2) pilih_search();
if(n==3) pilih_setting();
if(n==4) pilih_dokumen();
if(n==5) program();
}
}while(key2!=ESC);
setfillstyle(1,BLACK);
bar(0,459,150,276);
}

void main()
{
int drv, mode;
detectgraph(&drv, & mode);
initgraph(&drv, &mode,"(':");
for (;;)
{
desktop();
key=getch();
if(key!=ANEH)
{
tombol(1);
fe_menu();
}
}
}

Jumat, 05 Juni 2009

21 Keuntungan Merokok .. . . . . .


Berbahagia lah bagi para perokok.. .. pada
kondisi
tertentu sebaiknya Anda merokok saja, di lain
kondisi dianjurkan tidak;

1. Perokok pasif lebih berbahaya daripada
perokok aktif, maka untuk mengurangi resiko
tersebut aktiflah merokok.

2. Menghindarkan dari perbuatan jahat karena
tidak pernah ditemui orang yang membunuh,
mencuri dan berkelahi sambil merokok.

3. Mengurangi resiko kematian; dalam berita
tidak pernah ditemui orang yang meninggal
dalam
posisi merokok.

4. Berbuat amal kebaikan; kalau ada orang
yang
mau pinjam korek api paling tidak sudah siap /
tidak mengecewakan orang yang ingin
meminjam.

5. Baik untuk basa-basi / keakraban; Kalau
ketemu orang misalnya di Halte kita bisa
tawarkan rokok. Kalau basa-basinya tawarkan
uang
kan nggak lucu.

6. Memberikan lapangan kerja bagi buruh rokok,
dokter, pedagang asongan, pembuat asbak,
pabrik
kemasan dan perusahaan obat batuk.

7. Bisa untuk alasan untuk tambah gaji karena
ada post untuk rokok dan resiko baju berlubang
kena api rokok.

8. Bisa menambah suasana pedesaan / nature
bagi
ruangan ber AC dengan asapnya sehingga
seolah-
olah berkabut.

9. Menghilangkan bau wangi-wangian ruang
bagi
yang alergi bau parfum.

10. Kalau mobil mogok karena busi ngadat tidak
ada api, maka sudah siap api.

11. Membantu program KB dan mengurangi
penyelewengan karena konon katanya merokok
bisa
menyebabkan impoten.

12. Melatih kesabaran dan menambah
semangat
pantang menyerah karena bagi pemula merokok
itu
tidak mudah; batuk-batuk dan tersedak tapi
tetap
diteruskan (bagi yang lulus).

13. Untuk indikator kesehatan; biasanya orang
yang sakit pasti dilarang dulu merokok. Jadi
yang merokok itu pasti orang sehat.

14. Menambah kenikmatan: sore hari minum
kopi
dan makan pisang goreng sungguh nikmat.
Apalagi
ditambah merokok !

15. Tanda kalau hari sudah pagi, kita pasti
mendengar ayam merokok

16. Anti maling, waktu perokok batuk berat di
malam hari

17. Membantu shooting film keji, rokok
digunakan
penjahat buat nyundut jagoan yg terikat
dikursi... hahaha penderitaan itu pedih
jendral..!!!

18. Film Koboy pasti lebih gaya kalo ngerokok
sambil naek kuda, soalnya kalo sambil ngupil
susah betul.

19. Teman boker yg setia

20. Buat ngelobangin jawaban-2 Ebtanas

21. Membuat awet muda, karena konon orang
yang
merokok berat belum sampai tua udah mati
duluan
kena kanker paru-paru.
__________________

Surat Rahasia.. . . .

Dear Sir/Madam,
We wish to congratulate you over your email success in our computer Balloting .This is a Millennium Scientific Electronic Computer Games in which email addresses were used. All participants were selected through a computer ballot system drawn from over 100,000 company and 50,000,000 individual email addresses from all over the world. It is a promotional program aimed at encouraging intern et users; therefore you do not need to buy ticket to enter for it.

Your email address drew and have won the sum of 750,000 Euros ( Seven Hundred and Fifty Thousand Euros) in cash cr edited to file with
REFERENCE NUMBER: ESP/WIN/008/05/10/MA WINNING NUMBER : 14-17-24-34-37-45-16 BATCH NUMBERS : EULO/1007/444/606/08; SERIAL NUMBER: 45327 and PROMOTION DATE: 10th DEC. 2008.

To claim your winning prize, you are to cont act the appointed agent below as soon as possible for the immediate release of your winnings with the below details.

1) Your Full Name:
2) Your Telephone Number:
3) Your Mobile Number:
4) Fax Number (If available)


AXA SEGUROS S. A.
Contact Person: Mr. Paul Herold. ( Foreign Operations Manager )
Tel: 0034-665-985-717
Email:
axaseguros20082009@hotmail.com or axaseguros1010@aim.com

Congratulations once again from all our staff.
Mrs Hector Palmira. (Secretary)
Euro Milliones Board.