Hello all,
Could someone explain how to use Windows SetDefaultPrint function with
PB ???
http://msdn.microsoft.com/en-us/library ... S.85).aspx
I tried :
SetDefaultPrinter_ ("my_printer")
but the compiler returns an error.
By the way... Is there any way to use this function ???
Thks a lot,
William.
SetDefaultPrinter library...
SetDefaultPrinter library...
Beware of the man who has the solution before he understands the problem...
Its a driver, but also export functions like a dll:
Code: Select all
PrinterName.s="Brother HL-1250"
#Lib=1
winspoollib=OpenLibrary(#lib,"Winspool.drv")
Prototype ProtoSetDefaultPrinter(name.s)
If winspoollib
SetDefaultPrinter.ProtoSetDefaultPrinter=GetFunction(#Lib,"SetDefaultPrinterA")
Result=SetDefaultPrinter(PrinterName)
Debug result
EndIf
SPAMINATOR NR.1
Well, I am not sure it's a driver, the goal is not to add a nex printer, just
to define a nex one as default in the existing list.
Iam not sur to understand that code so Iam trying tomorrow.
I was also working on another way :
rundll32 printui.dll,PrintUIEntry /y /n "printer"
but it doesn't work using RunProgram()...
Thks,
WW
to define a nex one as default in the existing list.
Iam not sur to understand that code so Iam trying tomorrow.
I was also working on another way :
rundll32 printui.dll,PrintUIEntry /y /n "printer"
but it doesn't work using RunProgram()...
Thks,
WW
Beware of the man who has the solution before he understands the problem...