Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Top level form not getting focus
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01485564
Message ID:
01485672
Vues:
87
Hi Cetin and Naomi, thank you both for your suggestions.

In a desperate attempt to do things that don't make a lot of sense to me, since I exhausted all the sensible ideas, I moved the form instantiation around in main.prg to BEFORE a call to a messagebox(). Since the form's not modal anyway, it wouldn't make any difference, and that solved the problem.

Apparently you can't have ANYTHING related to user interface happening AT ALL before opening a form in a single-form application.

Again, thanks!

Alex

>Hi all,
>
>I've no idea what changed in the past 2 hours, but a simple app I'm working (single form, no menus, no vfp screen) is opening up WITHOUT focus.
>
>I have checked my code against the usual recommendations:
>
>config.fpw included in executable with only "screen = off"
>
>form properties:
>WindowType = 1 (modal)
>ShowWindow = 2 (top level form).
>
>It was working well but from about 2 hours ago, the form doesn't have the focus when I start the app.
>
>I've even added a messagebox to the form's gotfocus event to ensure it is firing (it is), but when I click on the messagebox's OK button, the form loses focus again (focus goes back to the executable file in windows explorer (where I started it from) or the shortcut I created to start the executable.
>
>I've rebooted the computer, thinking that it might have something to do with the OS, but no change.
>
>I've seen some solutions suggesting the use of windows' api calls to work around this problem, but I'd really like to know what the hell causes this [obviously buggy] behavior.
>
>Thanks!
>
>Alex
Low-carb diet not working? Try the Low-food diet instead!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform