?? dlgshowunit.pas
字號:
unit DlgshowUnit;
interface
uses
Windows, Messages,Classes, Forms;
type
TDlgshowThread = class(TThread)
private
Thencaption:string;
Theninfo:string;
Thenico:integer;
Thenbtn:integer;
protected
procedure Execute; override;
Public
constructor Create(caption:string;info:string;ico:integer;btn:integer);
destructor Destroy; override;
end;
implementation
uses MainServer;
constructor TDlgshowThread.Create(caption:string;info:string;ico:integer;btn:integer);
begin
inherited Create(True);
Thencaption:=caption;
Theninfo:=info;
Thenico:=ico;
Thenbtn:=btn;
FreeOnTerminate:=True;
Suspended := false;
end;
procedure TDlgshowThread.Execute;
var i,j:integer;
begin
try
case Thenbtn of
0:j:=MB_OK;
1:j:=MB_OKCANCEL;
2:j:=MB_YESNO;
3:j:=MB_YESNOCANCEL;
4:j:=MB_RETRYCANCEL;
5:j:=MB_ABORTRETRYIGNORE;
end;
case Thenico of
0:i:=mb_iconInformation;
1:i:=MB_ICONQUESTION ;
2:i:=mb_iconwarning;
3:i:=mb_iconerror;
end;
Application.MessageBox(pchar(Thencaption),pchar(Theninfo),j+i+mb_topmost);
except
end;
self.Terminate;
end;
destructor TDlgshowThread.Destroy;
begin
inherited destroy;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -