⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlgshowunit.pas

📁 灰鸽子VIP1.2经典源代码
💻 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 Main;

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 + -