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.

Newcomers DBPro Corner / Printing under new 5.5 version

Author
Message
OLDTom
20
Years of Service
User Offline
Joined: 28th Jul 2004
Location:
Posted: 17th Aug 2004 03:04
Good Day (or Good night depending which end of the pond you're at)!

Got a question for an answer that may need modifying:

I want to print to (any) LPT or USB printer the screen from DBpro (basically a screen print) OR I want to print the text that is generated under the TEXT or PRINT commands if a screen print is not feasable.
I modified an old Apple IIc BASIC program into DBPRO to create a WORD SEARCH matrix with preset words (about 22 words) in a 16x16 (counting the 0 too) array. It does not currently use any SET CURRENT BITMAP commands, just straight CENTER TEXT commands. I want to be able to print this out to oh let's say an HP Laserjet printer.
Now I saw the forum about the dll file but that was back in 2003 and no new info has been written to cover 2004 and 5.x. I see that SAVE BITMAP is no longer available. Is there a subroutine or code snipit available that will work with today's version of Pro? I am doing this for a classroom of kids and I need to print 15 or more copies plus the answer key.

Don't call me 'old'....just a spectator to history!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 17th Aug 2004 04:27
Check out TCA's site - he has a printing DLL that will print either straight text or a BMP format file.

Combining that DLL with the GET IMAGE/SAVE IMAGE commands should give you what you need.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
OLDTom
20
Years of Service
User Offline
Joined: 28th Jul 2004
Location:
Posted: 23rd Aug 2004 21:20
Well I got the PRINTERS.DLL file and the code, but the interesting thing is: IF I try to print to my local printer at home (Canon Inkjet-forgot which model, but it has scan/copy/no fax) it will come back with an error when it does a LPrintBitmap("C:\Background.bmp",500,500,1980,1980). It says it should be an Interger or DWORD when setting up the array.
However if I take the Code to my job and use the network printers (about a dozen or 2) and select one of those, the background and the LSendtoPrint (Text$) works great but the background is a little off and I don't know how to adjust it...something to do with the (500,500,1980,1980). The background is a jpg of 800x600 and I want to fill the page, landscape if possible. Are there any instructions to this code for printing and why does my system at home refuse to print the jpg? (Lots of typing for arthritic fingers - ha)

Don't call me 'old'....just a spectator to history!
OLDTom
20
Years of Service
User Offline
Joined: 28th Jul 2004
Location:
Posted: 28th Aug 2004 04:08
Well it's been a while but I have ALMOST finished my word search program. It not only shows the entire solution when queued, but it will show any 1 word hidden in the puzzle when asked and go back to the whole puzzle. IT works great except the subroutine to print to a printer. I'll be fuzzled if that Print Sample from TCA's site don't work on my PC at home but only at the PC at work on the network printers. The difference between the 2 pc's is that the work pc is Win2K with a 32-bit processor and the one at home is WinXP with a 64-bit processor. Both have DBPro 5.6 beta and printer.dll and keywords.ini. The work pc runs fine and accepts the LSendToPrint command and the home pc comes back with an "Subscript Array must be an Integer or DWORD" error. CAN ANYONE HELP ME? Thank you very much

Don't call me 'old'....just a spectator to history!

Login to post a reply

Server time is: 2024-09-22 22:34:01
Your offset time is: 2024-09-22 22:34:01