مربع يتغير لونه حسب ضغط المفاتيح
صفحة 1 من اصل 1
مربع يتغير لونه حسب ضغط المفاتيح
مربع يتغير لونه حسب ضغط المفاتيح
- الكود:
program couleur;
uses crt;
var i:integer; ch:char;
begin
CheckBreak:=False;
TextMode(Lo(LastMode)+Font8x8);
TextBackground(Black);
TextColor(White);
repeat
clrscr; i:=i+1; ch:=readkey;
TextBackground(1+i); TextColor(4+i);
Window(10,10,60,40);
write('Presse key Exc et key',i); readkey;
if ch=#27 then i:=15;
until (i>=15)and((keypressed)or(i=15));
TextMode(2);
end.
صفحة 1 من اصل 1
صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى