H
huawdg
Unregistered / Unconfirmed
GUEST, unregistred user!
Windows 2000 + Delphi 6
这是 MIDAS 三层中的客户端应用程序。
编译成 Exe 文件后,运行 Exe 程序,点 Button1,再点 Button2,或先 Button2,再 Button1 后,Windows 关机/注销时,此程序不能终止,导致系统不能关机/注销。必须先手工关闭此程序后才行,真是太奇怪了啊。
服务端程序启动或不启动都无所谓,结果都一样。
高手快来帮忙啊。
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBClient, MConnect, SConnect;
type
TForm1 = class(TForm)
Button1: TButton;
SocketConnection1: TSocketConnection;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
try
SocketConnection1.Open;
except
SocketConnection1.Close;
end;
// Application.MessageBox('ddd','ddd');
// MessageBox(Handle,'aaa','ddd',0);
// showmessage('ok');
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
// Application.MessageBox('ddd','ddd');
// MessageBox(Handle,'aaa','ddd',0);
showmessage('ok');
end;
end.
这是 MIDAS 三层中的客户端应用程序。
编译成 Exe 文件后,运行 Exe 程序,点 Button1,再点 Button2,或先 Button2,再 Button1 后,Windows 关机/注销时,此程序不能终止,导致系统不能关机/注销。必须先手工关闭此程序后才行,真是太奇怪了啊。
服务端程序启动或不启动都无所谓,结果都一样。
高手快来帮忙啊。
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBClient, MConnect, SConnect;
type
TForm1 = class(TForm)
Button1: TButton;
SocketConnection1: TSocketConnection;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
try
SocketConnection1.Open;
except
SocketConnection1.Close;
end;
// Application.MessageBox('ddd','ddd');
// MessageBox(Handle,'aaa','ddd',0);
// showmessage('ok');
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
// Application.MessageBox('ddd','ddd');
// MessageBox(Handle,'aaa','ddd',0);
showmessage('ok');
end;
end.