TPopupWindow=class(TForm)procedureFormDeactivate(Sender: TObject);procedureFormClose(Sender: TObject;varAction: TCloseAction);procedureFormShow(Sender:TObject);procedureFormCreate(Sender:TObject);procedureFormCloseQuery(Sender: TObject;varCanClose: Boolean);private{Private declarations}FPrevActiveWindow: HWND...
我试了好像没用,鼠标点桌面或其他窗口,则form窗体变为非激活,应该触发啥事件? FormDeactivate FormDeactivate的触发时机: when the form transitions from being the active form to another form in the same application becoming the active form. 特别说明: If activation goes to another application, this event...
main in 'procview.pas' {Form1};{$R *.RES}{//这是系统自动的beginApplication.Initialize;Application.Title :='系统进程监控';Application.CreateForm(TForm1, Form1);Application.Run;end.}varmyhwnd:hwnd;beginmyhwnd := FindWindow(nil, '系统进程监控'); // 查找窗口if myhwnd=0 then // 没有发...
Form2.Top = ShowingPoint.Y Form2.Show end 7.在Form2的OnDeactivate事件下添加如下代码: procedure TForm2.FormDeactivate Sender TObject begin Close // 当窗体失去焦点后,关闭自己。 end 8.按F9键运行程序,双击Button1后,Form2就会像弹出菜单一样显示出来,单击Form1的任意处,Form2将会自动关闭。接...
8.在iconform的deactivate事件中写: close; 9.在label_restore的click事件中写: form1.trayicon1.Restore; 在label_exit的click事件中写: Application.Terminate; 10.至此,编程工作已经完成,运行后点击托盘图标看看效果如何。你可以在iconform上作你想作的事情,不用说图片,在form上你可以作的事情就太多了。
procedure TOLEObjectForm.Deactivate1Click(Sender: TObject); begin OLEContainer.Active := False end; 8.3.4 粘贴OLE对象 一些OLE服务器允许用户把OLE对象复制到剪贴板,如果一个OLE对象复制到剪贴板上,OLE应用程序可通过初始化OLE包容器部件来粘贴OLE对象。
ValidParentForm 函数 同返回包含指定控件的窗体或属性页,但触发一个异常 文件: Graphics CharsetToIdent 函数 获得一个字符集的名字 ColorToIdent 函数 获得一个颜色的名字 ColorToRGB 函数 把TColor值转换成RGB ColorToString 函数 把TColor值转换成字符串 ...
DeactivateRenderingContext; // 解绑 DC, RC wglDeleteContext(RC); // 释放 RC ReleaseDC(Handle, DC); // 释放 DC 很简洁, 很不统一. 但是为什么我运行的时候什么都没有啊? 别着急, 这只是一点微小的贡献. 设置视窗 在Form 的 Resize 事件中加入如下代码: ...
OnDeactivate := DoDeactivate; OnException := DoException; OnHelp := DoHelp; OnHint := DoHint; OnIdle := DoIdle; OnMessage := DoMessage; OnMinimize := DoMinimize; OnRestore := DoRestore; OnShowHint := DoShowHint; OnShortCut := DoShortcut; ...
Form1: TForm1; implementation {$R *.fmx} procedure TForm1.MouseMove(Shift: TShiftState; X, Y: Single); begin inherited; Caption := Format('%f, %f', [X, Y]); end; end. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. ...