Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't get VFP-Form active in W2K
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00546080
Message ID:
00547248
Views:
11
Hi!

Hmm, if I can take a look to that program... Indeed, very strange problem.

>Yo !
>
>All doesn't help;
>
>We even turned the ShowWindow the other way around : put all other windows to the taskbar. Doesn't help either.
>
>Let's forward this to Bill (or whoever is in charge there now).
>
>Thx for helping, but let's give up...
>
>
>>Hi!
>>
>>Its quite strange, because you're talking about something that looks like a bug in W2K ;) Just set _VFP.AutoYield to .T., or issue DOEVENTS somewhere in your startup program after you issued ShowWindow(). When VFP app program in working, you cannot either minimize or maximize or whatever in VFP until VFP process these events. VFP proces them when _VFP.AutoYield is .T., or during the waiting state. DOEVENTS also allow to simulate waiting state by processing all pending events.
>>
>>Finally, under W2K clicking on the taskbar on the application icon will cause it to minimize. Look if you're not overused the ShowWindow function so it shows VFP 2 time by such way that it is minimized by taskbar (just a joke - this seems works only by mouse, but who know ;)
>>
>>HTH.
>>
>>>Back again, and the night will be darker as I expected ...
>>>
>>>We setup a small program that uses GetWindow, GetDesktopWindow, GetWindowText, IsIconic, SetForegroundWindow, ShowWindow. To get the idea.
>>>The ShowWindow (IF IsIcon()) was performed with SW_SHOW and SW_RESTORE;
>>>All is running fine in W95 (I expect - and the rest), but won't work in W2K;
>>>The Iconized task remains like that, though it flikkers a 5 times dark-blue ("want to tell you something ...") and remains dark-blue after that.
>>>So I guess there is a real problem here.
>>>
>>>BUT :
>>>
>>>By now I can narrow down the problem to VFP-W2K only, I mean, not being dependent on our app :
>>>
>>>Our testprogram runs standalone, and can be performed on the VFP-DE-desktop;
>>>After the program is started, it waits for a few secs, and allows you to minimize VFP or make another task active (alt-tab etc.). Once the timer elapses, it makes VFP the active task again. Well, it does on W95, but doesn't on W2K. So ???
>>>
>>>So everyone should be dealing with this.
>>>
>>>Now note that if I start VFP-DE without app, nothing is the matter, and the problem WILL originate from starting other tasks like our app does. This of course to be prooven bij the test-program, which just should work but doesn't (and does on W95 !).
>>>
>>>Now coincidentally I saw PC-Anywhere behave the same (doesn't come forward after startup, but form is there at wrong ZOrder). Thus, a W2K problem I guess.
>>>
>>>Is anyone experienced on this anoying thing ?
>>>
>>>We can survive with it, but it bothers me.
>>>Please don't bother writing this test-program, because I can put it here easily.
>>>
>>>
>>>>Hi!
>>>>
>>>>If DECLARE DLL exists, that you will be able to use these API functions. It seems you just misunderstood what is API function here - it is not the FoxAPI function. It is Windows API function from Windows kernels and DLLs. Both ShowWindow, FindWindow and SetForegroundWindow are Windows API functions. There is a section here at UT for API functions where you can find a lot of samples. Take a look also to the Anatoliy Mogylevets site http://www.news2news.com/vfp/index.php that is also for using Windows API functions in VFP. With these functions you can do a lot more things...
>>>>
>>>>HTH.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform