当前位置: 动力学知识库 > 问答 > 编程问答 >

Delphi - Form Deactivate

问题描述:

What is the difference when a form hides or when it deactivates ?

When hiding my main form I log the event to a database (as application start). So I was wondering when to do the logging: on hide event or deactivate ? When I deactivate the form,what exactly am I doing?

网友答案:

OnDeactivate executes whenever your Form (or "Window") loses focus (such as when the user selects another window). OnHide executes when you call Visible := False or MyForm.Hide;

There is no OnEvent method built into TForm for OnMinimize or OnRestore, but a quick Google search will yield great examples on how to implement them yourself.

分享给朋友:
您可能感兴趣的文章:
随机阅读: