In the Wish List I found a reference that's about the same observation:
Form calls Wish #920
I have commented on that wish that I'm inclined to call it a BUG. So, I'm prepared to add an entry in the buglist. But first I should discuss it here in the Messages Area.
Who has something to say about it? If no one reacts, then I'll add the entry in the buglist!
>Hi All,
>
>I have a main As-Top-Level-Form, modeless and Desktop=True.
>Another form (called from the main form's menu) is an In-Top-Level-Form, modeless and Desktop=True.
>When the user has both open and clicks on the main form, it gets the focus, but it won't come on top!
>
>I've tried all suggestions here mentioned and seemingly related, like:
>- GetActivewindow()
>- GetForegroundWindow()
>- activate window (thisform.name) top
>- AlwaysOnTop
>None of them appears to help.
>
>The main form will come on top if the second form is an As-Top-Level-Form and if both have Desktop=False. This is almost okay, but I'd like to have the second form to be a child, for in that case the user can minimize both with one click on the minimize button of the main form.
>
>This code will (should) make clear what I'm refering to:
>
PUBLIC oform1, oform2
>
>oform1=NEWOBJECT("form1")
>oform1.Show
>read events
>RETURN
>
>DEFINE CLASS form1 AS form
>
> Top = 17
> Left = 102
> ShowWindow = 2
> DoCreate = .T.
> Caption = "Form1"
> Name = "Form1"
>
> ADD OBJECT command1 AS commandbutton WITH ;
> Top = 36, ;
> Left = 66, ;
> Height = 27, ;
> Width = 84, ;
> Caption = "Command1", ;
> Name = "Command1"
>
>
> ADD OBJECT command2 AS commandbutton WITH ;
> Top = 210, ;
> Left = 264, ;
> Height = 27, ;
> Width = 84, ;
> Caption = "Command2", ;
> Name = "Command2"
>
>
> PROCEDURE command1.Click
> oform2=NEWOBJECT("form2")
> oform2.Show
> ENDPROC
>
>
> PROCEDURE command2.Click
> thisform.release()
> clear events
> ENDPROC
>
>ENDDEFINE
>
>DEFINE CLASS form2 AS form
>
> Top = 0
> Left = 0
> Height = 205
> Width = 327
> Desktop = .T.
> ShowWindow = 1
> DoCreate = .T.
> Caption = "Form2"
> Name = "Form2"
>
>
> ADD OBJECT command1 AS commandbutton WITH ;
> Top = 150, ;
> Left = 216, ;
> Height = 27, ;
> Width = 84, ;
> Caption = "Command1", ;
> Name = "Command1"
>
>
> PROCEDURE command1.Click
> thisform.release()
> ENDPROC
>
>ENDDEFINE
>
>Any suggestions?
Groet,
Peter de Valença
Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.