Reputation: 3719
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?
Upvotes: 1
Views: 4405
Reputation: 5869
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.
Upvotes: 2