P_server.dpr
上传用户:psxgmh
上传日期:2013-04-08
资源大小:15112k
文件大小:1k
- program P_server;
- uses
- Forms,
- windows,
- Messages,
- U_server in 'U_server.pas' {frmMain},
- WZGL_RDB in 'WZGL_RDB.pas' {WZGL: TRemoteDataModule} {WZGL: CoClass},
- DBConnectFrm in 'DBConnectFrm.pas' {frmDBConnect};
- {$R *.TLB}
- {$R *.RES}
- const
- CM_RESTORE = WM_USER + $1000; {自定义的“恢复”消息}
- WZGL_APP_NAME = 'WZGL_System';
- var
- RvHandle: hWnd;
- begin
- RvHandle := FindWindow(WZGL_APP_NAME, nil); //查找窗体类名来查找窗体
- if RvHandle > 0 then //查找的话
- begin
- PostMessage(RvHandle, CM_RESTORE, 0, 0); //给找的窗体发送消息,让它显示在最前面
- Exit; //退出程序
- end;
- Application.Initialize;
- Application.Title := '物资管理系统 —应用程序服务器';
- Application.CreateForm(TfrmMain, frmMain);
- Application.Run;
- end.