Paradox Community

Items in pnews.paradox-development

Subject:Re: PrinterSetCurrent
Date:6 Aug 2017 16:22:01 -0400
From:"Kevin Zawicki" <numberjack@wi.rr.com>
Newsgroups:pnews.paradox-development

I have chased the hang for years and versions, never found out what caused
it.

I even rebuilt a PC that hung, at an OS level, same OS same everything as
far as I could tell, that did fix it on That PC.

Does your exe work live in session? Meaning I can have paradox open, run
your exe, and the active Paradox session recognizes the change? Every other
method I have seen / tried, you have to restart Paradox.


"modridirkac" <jure.zorko@gmail.com> wrote:
>To je sporočilo iz več delov v obliki MIME.
>
>	charset="iso-8859-2";
>	reply-type=original
>
>Sometimes, the only way to change printer is to change system default 
>printer.
>(OPAL only hangs)
>
>For that I have small .net  EXE program, which activates printer on system

>level.
>
>Program takes some parameters.
>printer.exe list     : will list printers installed on system
>pinter.exe act "Printer name"   : will activate printer "Printer name"
>pinter.exe actm "Printer name"   : will activate printer "Printer name"
AND 
>sen message to all programs, that printer has changed.
>
>
>type StringArray = Array[]String
>endType
>
>method ListOfPrinters(var ARprint StringArray)
>var TS TextStream
>     line string
>endVar
>      line = "cmd /c "+fullname(":TOOLS:printer.exe")+" list > 
>"+fullname(":PRIV:listprint.txt")
>   execute(line,yes,ExeHidden)
>   TS.Open(fullname(":PRIV:listprint.txt"),"R")
>   TS.ReadLine(ARprint)
>   TS.Close()
>endMethod
>
>
>method ActivatePrinter(prn string, notify logical)
>var line string
>endVar
>    if notify then
>          line = "cmd /c "+fullname(":TOOLS:printer.exe")+" actm 
>"+"\""+prn+"\""
>   else
>          line = "cmd /c "+fullname(":TOOLS:printer.exe")+" act 
>"+"\""+prn+"\""
>   endIf
>   execute(line,yes,ExeHidden)
>endMethod
>
>
>
>Jure 
>


Copyright © 2004 thedbcommunity.com