Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Events when leaving/returning to an APP
Message
From
09/07/2014 03:06:44
 
 
To
08/07/2014 18:28:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01603349
Message ID:
01603377
Views:
65
You're welcome, as always.

>Tore --
>
>Thank you, sir, once again for your help. With a little tinkering, what you supplied is all I need.
>
>Thanks!
>
>>>>Jim,
>>>>
>>>>check Tools->Task Pane Manager->Solution Samples->New in Visual FoxPro 9.0->Binding to Windows Message Events. One of the events in the samples is "application switching", sounds like what you are looking for.
>>>>
>>>>>I have a little app that has one form running with DeskTop = .T.
>>>>>
>>>>>Once I have moved off the app to do anything else, I would like to have a timer running to update the caption (a simple count of items).
>>>>>
>>>>>When I return to the app, I want to refresh the grid.
>>>>>
>>>>>However, there don't seem to be any events that fire when I leave the app or return to it.
>>>>>
>>>>>Suggestions, anyone?
>>>>>
>>>>>Thanks
>>>
>>>Tore --
>>>
>>>Thanks; however, I have no Solution Samples installed and I am having no luck finding anything. (sigh)
>>
>>I strongly suggest that you install them, they are very helpful. Here are some of the important pieces, cut and pasted from the solution sample. However, to see everything you may need to install the samples, which include an object which you can simply dump on your form.
>>
>>"You can detect when someone switches between your application and another.
>>
>>Sample: to run the sample, click on the Enable Event button. Once the event is active, try switching between applications using your mouse or ALT+TAB.
>>
>>Details:
>>
>>This sample uses the following binding to handle application switching:
>>
>>BINDEVENT(_VFP.hWnd, WM_ACTIVATE, THIS, "handlewinmsg")
>>
>>Note that you can also bind to a Top-Level form if your application has the Visual FoxPro desktop hidden.
>>
>>BINDEVENT(myTopLevelForm.hWnd, WM_ACTIVATE, THIS, "handlewinmsg")
>>
>>The WM_ACTIVATE message
>>
>>WA_INACTIVE
>>
>>WA_ACTIVE
>>
>>WA_CLICKACTIVE
>>
>>You can find additional information about application activation events in MSDN:
>>
>>WM_ACTIVATE Message
>>
>>Click on the Constants button to view values for these #DEFINES."
Previous
Reply
Map
View

Click here to load this message in the networking platform