What causes an "isn't responding" message?

I have read that article, but it does not explain what is happening to me.
The screen initialization is the first thing that happens, and it executes step by step.
The following excerpt from a screenshot shows the diagnostic messages from the app. The most recent messages are at the bottom of the list.
image
You can see the first one is about screen initialization.
The messages are ALWAYS in this order.
[The lines beginning with '>' are messages sent from the app to the robot. Lines beginning with '<' are messages received from the robot.]
The timer events are not enabled until AFTER the BT client is connected. Therefore, they cannot be causing any delays before screen initialization. The app has no events that would initiate any other app activity until AFTER the BT client is connected.
NOTHING in my code gets executed until after screen initialization. That is why I am mystified as to why there is such a delay between when the screen appears and the "Begin screen initialization" message.
Once the BT connection is made, the app runs fine, with or without the "isn't responding" messages. The IR message only appears if there is a long delay between the app screen appearing and the beginning of the initialization routine.
Just for completeness, here is a screenshot of the app. It's just buttons, lables, and text boxes. The red dot is a sprite that can be dragged around to control the robot. But I never touch the screen until the BT connection is established.

Please provide a screenshot of that procedure

This is the relevant part

Any GUI changes during an event handler are not displayed until the event has completed.

So the "Begin screen initialization" message gets displayed after BT_autoConnect has finished

To get what you expect (i.e.first display the message, then do the processing) you have to use a clock as @ABG already explained

Taifun