Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 I cannot print the output screen from a standalone program
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
SamScott




PostPosted: Fri Feb 03, 2006 5:00 pm   Post subject: I cannot print the output screen from a standalone program

I am running Turing 4.0.4c, and I have found that the print button on the output window only works when you run a program from the editor. When you make a standalone executable, the print button does nothing. Is there a workaround or a patch for this problem?

Thanks for your help.

Sam.
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Fri Feb 03, 2006 5:18 pm   Post subject: (No subject)

Now this is unique!

You see, most people prefer to exclude the 'buttonbar' from their programmes when they compile, simply because it looks ungainly. The 'Print' that is used in the IDE (editor window) is not something that is part of the language itself, which is a little irritating to say the least. Once you've compiled, you're limited to printing text-only files...

This Tut will explain how to use the more common USB printers, as opposed to the Turing default LPT-style ones.
If you want to print graphics (i.e., anything non-text) - you're out of luck. You'll have to take a screencap of your window (Pic.ScreenSave) and manually print out that .bmp.
iker




PostPosted: Sat Feb 04, 2006 12:00 am   Post subject: (No subject)

Or, press Print Screen (should be beside f12), open paint, crop, and print, if you dont feel like redoing your project.
SamScott




PostPosted: Sat Feb 04, 2006 9:51 am   Post subject: (No subject)

Thanks for the reply. My program draws Sudoku boards. So printing is important, unfortunately. Sorry to hear I can't fix this.

Sam.
Delos




PostPosted: Sat Feb 04, 2006 3:58 pm   Post subject: (No subject)

Ah, now that changes thing. Yes you can fix this. The only difference being is that you'll not get all the fancy graphics you've incorporated.

I'm guessing (hoping!) that you're using arrays to store the values for each box. To start things off, figure out how to write those variables to a file so that they come out looking like a Sudoku board. You could use '|', '_', and so forth for borders if need be. (I believe there is also a character for overscores, which is always useful).
Once you are satisfied with the way the file looks, redirect output to the printer.
As I said, you lose your graphics, but is that so important when you can actually print!

If you want a 'Print Button', 'fraid you'll have to either make one yourself (Very Happy) or use the Turing GUI (Sad) to do it.
SamScott




PostPosted: Sun Feb 05, 2006 8:49 am   Post subject: (No subject)

Actually, I had a previous version that used ascii characters to write sudoku boards to a file. The problem is not just that they don't look very nice, but that the wierdness of the border characters, the size of the font, etc. actually make them more difficult to do as sudokus. That's why I went to graphics in the first place.

Anyhow, thanks for discussing this problem with me.

Cheers,
Sam.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: