>>Well here's where we stand...
>>I wrote a simple program in VFP which sends the output of
>>SET("PRINTER",2) and APRINTERS()
>>to a text file.
>>
>>Now I realize I have only part of the solution.
>>
>>In 2.6 SET PRINTER TO whatever
>>does not alter the windows default printer...just where Fox sends stuff.
>>I knew that, honest, but forgot.
>>
>>
I now need help to actually alter the windows default printer setting, using almost any method...except user intervention.>>
>Hi Richard,
>
>Basically, what you need to do is:
>
>1. Load Foxtools
>2. Register the following API call: GetProfileString(), WriteProfileString(), and SendMessage()
>3. Get the current default printer from the device= entry of the windows section using GetProfileString(). This is for restoring later.
>4. Use WriteProfileString() to set the new default.
>5. Call SendMessage() with HWND_BROADCAST to cause all open apps to reload the section.
>6. Repeat the above to restore.
>
>If you want code samples, let me know.
--------------------
Samples? That would be great! I've never played with the API before.
Where can I find documentation on these calls? I'm sure there are others as well....
Thank you,
Rick Liebespach
RLiebespach@OmniaGroup.com