msgbox Function

Unit
Unit5

Declaration
Function msgbox(title: string; msg: string; type_: Integer; icon_: Integer): Integer;

Implementation

function msgbox(title : String; msg : String; type_ : Integer;  icon_: Integer) : Integer;
begin
msg_box1 := Tmsg_box1.Create(nil);
msg_box1.Tag :=0;
msg_box1.Notebook1.PageIndex :=type_;
case icon_ of
   0:begin msg_box1.Image5.Picture :=msg_box1.Image1.Picture;MessageBeep(MB_ICONQUESTION);end;
   1:begin msg_box1.Image5.Picture :=msg_box1.Image2.Picture;MessageBeep(MB_ICONHAND);end;
   2:begin msg_box1.Image5.Picture :=msg_box1.Image3.Picture;MessageBeep(MB_OK);end;
   3:begin msg_box1.Image5.Picture :=msg_box1.Image4.Picture;MessageBeep(MB_ICONEXCLAMATION);end;
end;
if icon_>3 then msg_box1.Image5.Picture :=msg_box1.Image4.Picture;
msg_box1.Caption :=title;
msg_box1.Label1.Caption :=msg;
msg_box1.ShowModal;
Result:= msg_box1.Tag;
try msg_box1.free;except end;
End;


HTML generated by Time2HELP
http://www.time2help.com