>Has anyone used the GetProfileString and the WriteProfileString to change the windows default printer programmatically on the fly?
>
>I do not have much experience with API calls in VFP and would greatly appreciate some help.
>
>Thanks in advance,
Maria,
Yes, I have. My INIFiles class in the download section (under Win32 and other APIs) handles all the details of dealing with WIN.INI. In order for this to work correctly, all top-level windows need to be notified to re-load the appropriate section of the WIN.INI file. The class handles this automatically.
Having said that, I don't use this method any more. I'd use the Window Script Host's Network object to set the default printer.
George
Ubi caritas et amor, deus ibi est