Y
yanzhong
Unregistered / Unconfirmed
GUEST, unregistred user!
type
TfrmMain = class(TForm)
......
private
{ Private declarations }
procedure WMDeviceChange(var Msg: TMessage); message WM_DEVICECHANGE;
public
{ Public declarations }
....
implementation
{$R *.DFM}
procedure TfrmMain.WMDeviceChange (var Msg: TMessage);
begin
Close;
//Application.Terminate ;
end;
问题:
正常操作消息截获正常,窗口关闭也正常;
主窗口有菜单,当菜单下拉焦点在菜单上时,截获到了WM_DEVICECHANGE消息,但关闭不了窗口,如何解决?谢谢了
TfrmMain = class(TForm)
......
private
{ Private declarations }
procedure WMDeviceChange(var Msg: TMessage); message WM_DEVICECHANGE;
public
{ Public declarations }
....
implementation
{$R *.DFM}
procedure TfrmMain.WMDeviceChange (var Msg: TMessage);
begin
Close;
//Application.Terminate ;
end;
问题:
正常操作消息截获正常,窗口关闭也正常;
主窗口有菜单,当菜单下拉焦点在菜单上时,截获到了WM_DEVICECHANGE消息,但关闭不了窗口,如何解决?谢谢了