How to control Open/Resized event

Hi,

Is there any way to trigger Open / Resized event only when the related window or container is visible to a user?
It takes a long time to launch my Windows desktop application, which includes many windows and containers, and I noticed that most of the time is spent processing code in those events.

The Activated event is triggered only after a window is created, opened, and is visible to the user.

1 Like

A general recommendation would be to avoid placing computationally intensive code or code that depends on external sources into these events.

If it’s absolutely necessary, place those code in methods and call it using Timer.CallLater(250, AddressOf ...).

2 Likes

You saved my life. ‘Activate’ event works great for this application as only the related window or container becomes visible, it fires.

Thank you so much!