Delphi What Is An OnActivate Event In A DelphiVCL.Application?

FireWind

Свой
Регистрация
2 Дек 2005
Сообщения
1,957
Реакции
1,199
Credits
4,009
What Is An OnActivate Event In A DelphiVCL.Application?
By Muhammad Azizul Hakim December 7, 2021

The OnActivate or DelphiVCL.Application.OnActivate event occurs when an application becomes active.

Write an OnActivate event handler to perform special processing when the application becomes active.

When does an application become active?​

An application becomes active when it is initially run or when focus moves from another Windows application back to any window of the application.

Note: You can also use the TApplicationEvents component to respond to this event, which lets you assign an event handler from the IDE.

What are the details of the OnActivate event?​

Let’s take a look at all of DelphiVCL.Application.OnActivate properties and methods:
Код:
import DelphiVCL
 
dir(DelphiVCL.Application.OnActivate)
See the responses in our Windows command prompt:
1638866564049.png
You can also read short information about the DelphiVCL.Application.OnActivate using the print() command:
Python:
print(DelphiVCL.Application.OnActivate)
print(DelphiVCL.Application.OnActivate.__doc__)
See the responses in our Windows command prompt:
1638866608785.png