在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
unit UFrmModless; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TFrmModeless = class(TForm) lblInfo: TLabel; btnClose: TButton; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormDestroy(Sender: TObject); procedure btnCloseClick(Sender: TObject); private { Private declarations } procedure WMNCHITTEST(var Msg:TWMNCHITTEST);message WM_NCHITTEST; public { Public declarations } procedure CreateParams(var params: TCreateParams); override; end; var FrmModeless: TFrmModeless; implementation {$R *.dfm} procedure TFrmModeless.CreateParams(var params: TCreateParams); begin inherited CreateParams(params); params.Style := WS_THICKFRAME or WS_POPUP or WS_BORDER; end; procedure TFrmModeless.WMNCHITTEST(var Msg: TWMNCHITTEST); begin inherited; Msg.Result:=HTCaption; end; procedure TFrmModeless.FormClose(Sender: TObject; var Action: TCloseAction); begin Action := caFree; // FrmModeless := nil; end; procedure TFrmModeless.FormDestroy(Sender: TObject); begin FrmModeless := nil; end; procedure TFrmModeless.btnCloseClick(Sender: TObject); begin self.Close; end; end.
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论