Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SDI form refuses to show on top
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00348270
Message ID:
00348526
Views:
21
>You're missing the Init() and Show() in your analysis, so maybe the firing sequence is fouled up somehow.

I removed Init() from the list of tracked events, because there is an avalanche of Inits thrown by the controls on the form. Since Show() isn't an event, it is not tracked by the debugger. But I have written information from the Show methods into a log file to see when what happens. Everything seems to be alright, but after a control on the opened form got focus, it looses focus and _SCREEN is activatet.

>Also, you could try putting a thisform.show() in the gotfocus of the form or control on form, just to see if that would help...

I did that - same result.

>And another idea, does the form appear on top *without* the activex on the SDI? (Just to see if that's causing a problem)

The activex is not on the SDI form that is launched, but on a form that is tied to the _SCREEN and always on bottom (it gives an Outlook-like background to the application). When the application is run without this activex background, the result is still the same: the first time an SDI form is opened, it is hidden by the main screen.

To give some more detail: The main menu is tied to the _SCREEN, on of its items calls a method of the application object to show the SDI form. This method checks if there is already an instance of the SDI form and creates one if needed. Then the forms Show() is called:
* oApp.showAddressManager()

WITH THIS
  IF (ISNULL(.oAdr)) OR (VARTYPE(.oAdr) <> "O")
    .oAdr = CREATEOBJECT("frmKV")
  ENDIF
  .oAdr.Show()
ENDWITH
I've acquired quite a taste for a well-made mistake... [Fiona Apple]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform