Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printer List
Message
From
01/11/1998 20:48:13
 
 
To
31/10/1998 01:11:39
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Miscellaneous
Thread ID:
00153133
Message ID:
00153331
Views:
16
>How can I get the printer information from win3.1 "With OUT getting it from the API call GetProfileString". This application will be on Win 3.1, Win 95 and Win NT. On Win3.1 and 95 I can get the printers from the win.ini, but it would be nice if there was another dll that would return it to me with out having to check if NT or not. I don't even know where the printer info is stored in NT. Most likely the registry.
>
>Charles

Function ShowPrt
NumPrinters = Aprinter(cPrinterArray)

IF NumPrinters = 0
   messagebox("No Printer installed in current system!")
ELSE
   DefaultPrinter = SET("Printer", 2)
   msgPrinter = "Printer Information:" + REPL(Chr(13),2)
   For iX = 1 to NumPrinters
      if Upper(cPrinterArray[iX,1]) = DefaultPrinter
         msgPrinter = msgPrinter + cPrinterArray[iX,1] + Repl(Chr(9),2) + "[Default]" + chr(13)
      else
         msgPrinter = msgPrinter + cPrinterArray[iX,1] + chr(13)
      endif
   EndFor
   Messagebox(msgPrinter, 64, _screen.caption + " - ShowPrt Function")   
ENDIF

EndFunc



If you are using VFP 6, you can use Set("Printer", 3) to see which printer is
user current select!!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform