Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Can i use a printer with dbc

Author
Message
MKII
20
Years of Service
User Offline
Joined: 28th May 2004
Location: in a nutshell
Posted: 24th Apr 2005 07:50 Edited at: 24th Apr 2005 07:51
ok by now a few of you may have seen my periodic table program i wrote and released a while ago. I am already working on my next verision and was wondering, is their anyway I can make a printer friendly version of the information (in txt format) and put a button on the program that says "print info" and have it print the txt version?

thanks in advance for any help

edit I do have the enhancement pack edit

MKII
20
Years of Service
User Offline
Joined: 28th May 2004
Location: in a nutshell
Posted: 24th Apr 2005 23:54
can anyone help

Jake Blues
20
Years of Service
User Offline
Joined: 19th Jun 2004
Location: United States
Posted: 25th Apr 2005 00:06
I don't think it is possible with DBC or DBP. You may be able to do it with a dll though, but I haven't seen one for printing.

The answer to the great question of life, the universe and everything is 42.
MKII
20
Years of Service
User Offline
Joined: 28th May 2004
Location: in a nutshell
Posted: 25th Apr 2005 00:07
ok thanks ill look around dor a dll

NanoBrain
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 25th Apr 2005 08:00 Edited at: 26th Apr 2005 06:11
Nobody117,

You might be able to pull this off with the command:
EXECUTE FILE Filename, Commandline, Directory, Wait Flag. I don't have any experience with this command, but have read and thought about possibilities with it. It states that if you make the filename pointed to a document, instead of an .exe, it will open the document in a word processor of some sort.

The command line is to send additional commands to the application used to read the document. Though, you would have to study and find the command line prompt for print for that specific program.

Of course in doing this, DarkBasic might be minimized until the document is closed. However, I do believe that the wait flag will settle this problem and keep DarkBasic from minimizing. This is a theoretical thought from my mouth.

Does anyone have any correct input on this matter?


+NanoBrain+
MKII
20
Years of Service
User Offline
Joined: 28th May 2004
Location: in a nutshell
Posted: 25th Apr 2005 20:35
@NanoBrain that worked great i still need to find the commandline but the txt document does open.

Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 26th Apr 2005 00:36 Edited at: 26th Apr 2005 05:13
Take a look at this:

http://users2.ev1.net/~poellinger/preadme.htm

EDIT: The Main Page:

http://users2.ev1.net/~poellinger/pprtr.htm

There's a download button at the bottom of the page, but make sure you read all the stuff first, so you know how to use it. I've never actually used it before, so I really don't know anything about it. Hope it helps though .

EDIT: Here's a list of the functions that it supports:

functions:

PPrtr -- allows retrieval or change to any attribute of the default
printer

DefPrtr -- allows you to find out or change the default printer

Prtrs -- returns semi-colon delimeted list of available active
printers

PrtrCap -- returns structure (VB type) containing default printer
device capabilities

GetPrtr -- returns the name of the current default printer

GetPort -- returns the port of the current default printer

PPGetDriver -- returns the port of the current default printer

SetuPP -- pops up the printer's setup dialog (for those who
don't like the common dialog)

PPReady -- checks selected LPT for ready condition

PPDefReady -- checks current Windows default printer port
for ready condition

PPGetSizes -- returns paper, page and margin dimensions...
for calculating unprintable margins and printable
area

PPSetupFileName - establishes a filename as the printer output
destination
PPRemoveFileName - removes that filename from WIN.INI (cleanup)

PPResetDC - provides capability of making any pprtr() type changes,
e.g. orientation, bin, etc, on the fly within a
document, so that, for instance different pages could
have different orientations.

MKII
20
Years of Service
User Offline
Joined: 28th May 2004
Location: in a nutshell
Posted: 26th Apr 2005 04:21
ok ill take a look at it later im at school right now and they block it.

NanoBrain
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 26th Apr 2005 06:15
Underworld 1020,

Great! Thank you very much for your input, which is now so very helpful.


+NanoBrain+
MKII
20
Years of Service
User Offline
Joined: 28th May 2004
Location: in a nutshell
Posted: 26th Apr 2005 06:25
@underworld (some #)
i cant use the dll because it is 32 bit i belive,
i maybe able to but im not for sure.

Muncher
20
Years of Service
User Offline
Joined: 28th Apr 2005
Location:
Posted: 29th Apr 2005 02:26
there is a language called PureBasic in which you can custom make your own DLL's in basic (of course), to use them with DarkBASIC. I have some expreience in serial port and printer port access.

[email protected]

Login to post a reply

Server time is: 2025-05-23 11:09:23
Your offset time is: 2025-05-23 11:09:23