Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anyone use QuitApp in VFP6?
Message
From
28/01/2004 16:30:21
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
28/01/2004 14:54:32
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00871320
Message ID:
00871576
Views:
13
>Hi Jay,
>
>>>Has anyone modified the QuitApp project to work in VFP6? As much as I can tell the _VFP.hWnd variable is not available in version 6. Thanks!
>>
>>Renoir,
>>
>>You can use
>DECLARE long GetActiveWindow IN WIN32API
>>hWnd = GetActiveWindow()
>
>I took Sergey's suggestion and replace the _VFP.HWND references with a result of the GetActiveWindow call.
>
>>Thanks Sergey! Now for extra credit, do you know why this app does not seem to have any code to add records to the QuitApp table? I'll email the author, but thought I would give you first crack at it.
>
>For the second question. In the Timer event of the QuitApp class, it attempts to locate a existing record in the QuitApp.dbf, if not found, a record is added. You will find this at line 158 in the current download.
>
>If you, or anyone else, has enhanced the class, please send me the changes.
>
>Greg

Hey Greg,

Glad you joined in. I have one other question... The Destroy procedure doesn't seem to run for me and the record in QuitApp is not deleted unless the Admin_QuitApp was run and the lQuit value changed to .T. for that record. This is incorporated into my app, but I haven't made any changes other than the hWnd issue. Any thoughts? Also, I am adding some functionality to the Admin form and will forward a copy to you when I'm done.

UPDATE: Found it! I needed to RELEASE lQuitApp in my main program code. By the way, why did you name it lQuitApp instead of oQuitApp? Just curious since I thought it was a logical at first.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform