Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get desktop location using Win api function (VFP)
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
01167947
Message ID:
01167965
Views:
6
>>
>>ows  = CREATEOBJECT([WSCRIPT.Shell])
>>WAIT WINDOW ows.SpecialFolders(0) && All users    DESKTOP
>>WAIT WINDOW ows.SpecialFolders(4) && Current user DESKTOP
>>
>
>Why use "Magic numbers" ?
>
>? ows.SpecialFolders("AllUsersDesktop")
>? ows.SpecialFolders("Desktop")
>
:-)
Because magic collection item names didn't comes into my mind when I wrote the code.
But of course I could write a DEFINE variables to make code more readable.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform