hotel regim hotelier
hotel yahoo domain
Un mod mult mai simplu pentru a folosi sistemul de mesaje in Borland Delphi
Puneti acest cod sub " {$R *.dfm} "
Code:
procedure ArataMesaj(mesaj: string; titlu: string; tip: Integer);
var
eroare,informatie,exclamatie,intrebare,normal: boolean;
begin
if tip > 5 then exit
else
if tip < 1 then exit;
eroare := false;
informatie := false;
exclamatie := false;
normal := false;
intrebare := false;
{Setare tip mesaj} //begin
if tip = 1 then eroare := true;
if tip = 2 then informatie := true;
if tip = 3 then exclamatie := true;
if tip = 4 then normal := true;
if tip = 5 then intrebare := true;
{Setare tip mesaj} //end;
if eroare = true then
MessageBox(application.handle,Pchar(mesaj),Pchar(titlu), +mb_OK +mb_ICONERROR)
else
if informatie = true then
MessageBox(application.handle,Pchar(mesaj),Pchar(titlu), +mb_OK +mb_ICONINFORMATION)
else
if exclamatie = true then
MessageBox(application.handle,Pchar(mesaj),Pchar(titlu), +mb_OK +mb_ICONEXCLAMATION)
else
if normal = true then
MessageBox(application.handle,Pchar(mesaj),Pchar(titlu), +mb_OK)
else
if intrebare = true then
MessageBox(application.handle,Pchar(mesaj),Pchar(titlu), +mb_OK +mb_ICONQUESTION);
end;
Noua comanda va fi
ArataMesaj(string,string,integer);
Exemplu:
Code:
ArataMesaj('Nu imi place scoala!','Rst Center',2);
"Nu imi place scoala" - reprezinta mesajul care v`a fi afisat
"Rst Center" - reprezinta titlul mesajului
"2" - reprezinta tipul de mesaj (2 = mesaj de tip informatie)
Tipurile de mesaj:
1 - Mesaj eroare
2 - Mesaj informatie
3 - Mesaj exclamatie
4 - Mesaj normal
5 - Mesaj intrebare
Enjoy