On the issue of code between OPEN() and ACCEPT


@BoxSoft had this to say way back in the Clarion8 newsgroup in a topic called Re: Maximized MDI child not drawing correctly:

Are you tweaking your window structure manually between the OPEN and
ACCEPT statements (IOW, inside ThisWindow.Init, after SELF.Open)?
Anything you do there can potentially invoke the nasty Windows core
synchronization problems. Alexey at SV has don’t a great job of
dealing with most of the problem, but it’s impossible to manage it
all. Therefore, you need to be careful with the types of things you
do when the window is first opened.

For example, you shouldn’t add a maximize button on the fly, or change
the size of the window. At least not when it’s first opened."

I remember this, or related discussions, doing the rounds for some time and that the consensus was to basically be pretty careful about doing things too soon after the Open(window) call. That sometimes things that worked “just fine” in Clarion6 could manifest weirdness post C7.

Can anyone dig up more info on the topic or point out some other NG threads worth quoting here?


Many programs that I work on have the window code in the EVENT:OpenWindow. That is in the Accept loop or in TakeWindowEvent() in ABC templates. It “fires” after the window has completed opening.

Note that Open(Window) opens it in Clarion, but only “starts” the open in Windows. So you can set Props or variables, but not do other things yet.