问题描述:

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.

相关阅读:
Top