I totally agree with Andreas => IF in the open event, you decide you need to close, I suggest you do like this:
if lb_haveToClose then
// Avoid user ever sees the window flicker on screen
this.Visible = false
// Signal that window must cease and desist
post Close(this)
end if
This is the safe way to abort opening a window. "Open" event is a signal that the process to open a window including instantiating PB objects in the PB VM and obtaining UI resources in Window O/S in a moment results in the window becoming visible.
In airplanes it is bad rep to jump the brakes when you are so far down the runway that runway stops before you airplane stops. Hence, you must commit to the take-off but signal that you will immediately return and land because "this plane ain't gonna fly this time around."
PowerBuilder's "Open" is that moment in time. Pure luck may avoid your crash if you stand on the brakes but for the health of your crew, your passengers - or here your app and your end-user => Play it safe, take off but start the emergency landing procedure immediately.
HTH /Michael
I think that, according to PB help, this could be bug. What do you think?