Unable to print out (make hardcopy) of current program page or output page.

John & Rick,
A few months ago I acquired TB v6.007 and installed it on my Windows 7 system using the backup CD. I have been unable to make a hadrdcopy printout of the current progam (code) page. When I click on the FILE dropdown menue then click on the PRINT option, I get a screen with a box that reads "Print File-Default Settings" and a smaller box below it that reads "Print File Error, Could not open C:\Program, No such File or Directory". After running the program, there is no way of making a hardcopy printout of the output page. The dropdown at the upper lefthand corner gives me only the "Restore, Move, Size, Minimize, Maximize, Close" options. There is no PRINT option. What am I doing wrong or not seeing?? Anne and I have been e-mailing back and forth over this issue for several months, and have come up with no solution. Please help.

Stan Sheldon

Comments

PRINTING

Hi,

In one of your error messages there was a reference to the path of the file that is giving print problems - you only gave the start of the path e.g. c:\Program.....Am I correct in believing that the file reference may have been c:\Program Files......If this is the case then part of your problem may be the Program Files folder. In Windows Vista, Windows 7 and Windows 8 the Program Files folder is treated differently to all others. The result is that if you install TrueBASIC in this folder, then some of your files will be marked read/write protected. It seems to be a random effect. The end result is that TrueBASIC cannot access many of the files it needs to read in order to work. The answer is NOT to install anything in the Program Files folder or its sub-folders. This might also account for the fact that the third party printing software doesn't seem to work for you either.

Historically TrueBASIC has always had a problem with some types of HP printers. Personally I always use EPSON printers and they work just fine with everything.

The way the editor works is that it offers the user two options "printing" and "listing" under the editor FILE menu. One of the options uses the TrueBASIC OPEN #99:PRINTER technique. It has been known for some time that this does not work with some printers - notably HP printers. The alternative method uses a library module called PWlib. This library treats the printer like a window so any normal window statement or function works directly on the printer e.g. PRINT text$ or PLOT TEXT, AT x,y:text$. This method is extremely accurate and produces very high quality prints and so it should - a normal A4 sheet has 2892 pixels across the page and 3969 pixels down the page - several times better that a normal monitor screen. This definitely works with EPSON printers but not always with HP printers. Hence the inclusion of the third party software. The TBeditor looks to see if the third party software is present and if so it uses that in preference to the other two methods.

Regards
Big John

re: printing

Try running the PRFILE32.exe file directly from your V6.007 folder, clicking the Print File button and then choosing your source file. It should then give you the typical Windows printing dialog box and from there print the file. Also try the LISTING option in the editor window and see if that works. The printing file is a third party printing utility that John has used to get around some of the HP printing problems that still exist within the TB language system (on the wish list for V7 to fix), but if that doesn't work as a stand alone for you, then the problem is most likely something with your windows/printer setup. Maybe also try a fresh download and install--perhaps one of the utility programs is corrupted. Try the above and report back.

rwt

Dear rwt, Thanks for your

Dear rwt,
Thanks for your suggestions. I have already tried everyting you mentioned including the PRFILE32.exe, and the LISTING and PRINT options. I am still getting that funny screen with a box that reads "Print File-Default Settings" with a smaller box below it that says "Print File Error, Could not open C:\Program, No such file or directory". The printer will respond to these actions but very slowly, taking a minute or more to start or between pages, and will print only files that have been previously saved. Also, on the output page (the screen that gives the results after the program has been run) there is no dropdown menue that has a "PRINT" option. I'm only getting "Restore, Move, Minimize, Maximize, Close"

Let me try to explain exactly what I am looking for here. For many years I have been using TB version 5.41. On the program (code) page, there was a button on the upper left-hand corner of the screen that read "File". When this was clicked on, the dropdown menue included the options "New, Open, Close, Save, Save As..., Page Setup, Print, Print Selection, Exit". When the "Print" option was clicked on, what was on the screen went directly to the printer and printed out exactly. Included, was a heading with a nice box that contained the file pathway if the program had been previously saved (or "Untitled" if it had not) the page number, the time of day and the date. If the "Page Setup" option was chosen, I could print in Letter or Landscape format. The output page, which contained nemerical results, text, graphs or any combination of these, had a "File" button on the upper left-hand corner of the screen. When this was clicked on, the dropdown gave the options "Print, Copy, Stop". When "Print" was clicked on, what was on the screen went immediatly to the printer and printed out, exactly.

Can TB v6.007 do these things? If so, then how? I am presently using my word processor to print out programs and a scientific graphics software to print out graphs or plots from the data generated by TB. I should mention that I have an HP color printer.
Where do I go from here?

Output window printing

Hi,

Another thought occurs to me from your description of the problems you have been having. As you know Program Files has a space between the two words. In the good old days of DOS spaces were not allowed in file names. Along came Windows and this restriction was lifted. However the CHAIN statement was not updated in this way so if there are spaces in the chain statement parameters then it will not work properly. Printing is done by chaining to a special printer program or to the third party application. In either case if the path name contains "Program files" then it will not work. Re-install TrueBASIC in a folder e.g. c:\truebasic where there are no spaces in the name. This should keep you free of trouble.

Regards
Big John

Output window printing

Hi,

In the same folder as the TrueBASIC editor there should be a program called hardcopy.exe. Run this program to install a special hardcopy feature for all windows. What will happen is that a small green icon will appear on all windows next to the normal trio of buttons at the top right of your screen -(minimize, maximize and close window). This will also appear in the output window. use this icon to produce hardcopy prints of whatever is in the output window.

Regards
Big John

Re: hardcopy.exe

Hi John,

This doesn't seem to work, at least not with Windows 8.1. Tried starting the program both before and after starting up the editor and don't get the green icon. It doesn't show up as an APP in the Task Manager, and if it is just a process I don't recognize it in the list (what should be there?).

The fact the CHAIN can't handle spaces certainly should be on the list for Version 7 fixes. I do have my TB folder installed just to my second (D) drive so don't have the problem, but I'm guessing a lot of people have trouble with CHAIN because of this glitch. The obvious (current) solution is to place a copy of the program you want to chain to in the same folder as the True Basic program from which you are chaining. This is for sure an inelegant way of doing things!

rwt

re: printing

To print a screen from a program, try using call TC_WIN_PRINT(windowid). This works 'most of the time' for me (also with an HP color printer) from a single computer, but I still have trouble getting it to work with networked printers--at least those at my College where there is considerable security and extra steps (accepting page charges for example) which seem to interfere. Printing to HP printers from within TRUE BASIC programs seems still to be problematic...one of the primary bugs that needs to be fixed in Version 7.

If running PRFILE32.exe behaves as you have stated, then the problem would seem to be with your computer/printer. On my system if I choose PRFILE32.exe, the "Print File-Default Settings" box opens and then I choose 'print file' then get an 'open' dialog box to choose a file. Navigating through that, choosing a file, it then immediately prints that file. The format is in LANDSCAPE with a boxed outline, the filename at the top along with the date, time, and page number.

This is the same output I get from within the editor, but there I can highlight a section of the file to print. The "Print File-Default Settings" opens but immediately then opens the PRINT selection dialog (from Windows) where OK starts the printing. One 'feature' here is that I only get Landscape printing, no matter what the setting are.

What your editor experience looks like (not sure) is that PRFILE32.exe when triggered from the editor is looking for a file that it can't find. This is really a question for BIG JOHN in that what he actually sends to PRFILE32.exe with the editor PRINT command may be the problem. Again, see if PRFILE32.exe run separately gives the same PRINT FILE ERROR message.

Bottom line--TB version5.x doesn't play well with HP printers. The PRFILE32.exe is a third-party utility that John has used in the editor to get around this...works for me for all versions of Windows from 8.1 back through XP...but printing from within a TB program can still be problematic. TC_WIN_PRINT seems to be the most reliable way to print out screen contents, but may still have problems with networked and HP printers. PRFILE32.exe should work as a stand alone as described above...if not, then the problem may be in your system, not in the True Basic editor per se.

***added*** One other thing to try (probably won't help) but set the preferences of all the executable files in you True Basic folder to 'Run as Administrator'. This is in case there are any temporary files trying to be written as part of the editor printing process that are being blocked by security settings.

rwt

Printing

Hey John,

Thanks for your continued suggestions. I think, eventually, I will have to get you or someone in your group on the phone and have you walk me through things. My computer literacy is rather low so I'm not really sure how to execute some of those suggestions or if what I am doing is right. I will keep trying; but this e-mailing back and forth has gone on for almost a year (much of it with Anne) with no progress.

Stan

Printing

Hey John,

Thanks for your continued suggestions. I think, eventually, I will have to get you or someone in your group on the phone and have you walk me through things. My computer literacy is rather low so I'm not really sure how to execute some of those suggestions or if what I am doing is right. I will keep trying; but this e-mailing back and forth has gone on for almost a year (much of it with Anne) with no progress.

Stan