Hello and thanks in advance for the help.

In WinXP (or most other Win OS's) you can go to START->SETTINGS->PRINTERS

right click on the printer and choose "SET AS DEFAULT"

Is there a way to do this in code from VFP?

Thanks again,

Jeff

Re: Another question that doesn't really belong here but since you are my people.... by Eric

Eric
Thu Apr 28 10:34:43 CDT 2005

See if this helps:
How To Change the Default Windows Printer from FoxPro
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q103645
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8

"Jeff Grippe" <jgrippe@hilldun.com> wrote in message
news:1171qu9h8j3349f@news.supernews.com...
> Hello and thanks in advance for the help.
>
> In WinXP (or most other Win OS's) you can go to START->SETTINGS->PRINTERS
>
> right click on the printer and choose "SET AS DEFAULT"
>
> Is there a way to do this in code from VFP?
>
> Thanks again,
>
> Jeff
>



Re: Another question that doesn't really belong here but since you by SergeyBer

SergeyBer
Thu Apr 28 11:41:34 CDT 2005

Jeff Grippe wrote:
> Hello and thanks in advance for the help.
>
> In WinXP (or most other Win OS's) you can go to START->SETTINGS->PRINTERS
>
> right click on the printer and choose "SET AS DEFAULT"
>
> Is there a way to do this in code from VFP?
>

DECLARE Integer SetDefaultPrinter IN WINSPOOL.DRV String
...
IF SetDefaultPrinter(lcWinPrinter) = 0
* "Cannot change default Windows Printer"
...
ENDIF


--
--sb--

VFP MVP

Re: Another question that doesn't really belong here but since you are my people.... by Rolf

Rolf
Thu Apr 28 11:48:18 CDT 2005

m.op = createobject("WScript.Network")
m.printer = "HP Laserjet 6MP"
m.op.SetdefaultPrinter(m.printer)