LB Booster
« MainWin OR Printer? »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:05am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: MainWin OR Printer?  (Read 316 times)
SarmedNafi
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 93
xx MainWin OR Printer?
« Thread started on: Oct 30th, 2015, 5:55pm »

In the following code LBB goes to printer not to mainwin. The preferable is the mainwin as well.

Sure there is a way to make LBB gose to the mainwin.

'-------------------code
Filedialog, "Open Graphic File", "*.bmp;*.gif;*.png;*.jpg;*.jpeg", picFile$
graphicFormat$ = picFile$

Print "GraphicFormat = ";graphicFormat$;"."
If graphicFormat$ = "Unknown" Then
Print "Unable to continue."
End
End If

Open picFile$ for Input as #pic
piic$=Input$(#pic, LOF(#pic))
Close #pic

PRINT nodump piic$

wait
'-------------------code

Regards,
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: MainWin OR Printer?
« Reply #1 on: Oct 30th, 2015, 11:20pm »

on Oct 30th, 2015, 5:55pm, SarmedNafi wrote:
In the following code LBB goes to printer not to mainwin.

You seem to be sending binary data (the contents of an image file, such as a GIF or JPG) to the mainwin, which isn't normally a sensible thing to do. Binary data is likely to contain 'control characters', i.e. characters in the range chr$(0) to chr$(31), and they can have all kinds of (superficially) strange effects, including redirecting output to the printer!

Generally the only control characters which should be output to the LBB mainwin are Carriage Return - CR or chr$(13) - and Line Feed - LF or chr$(10). If you want to know the effects of the other characters you can find a description here, but to keep things simple don't send binary data to the mainwin - it is intended only to receive text.

Richard.
« Last Edit: Oct 30th, 2015, 11:21pm by Richard Russell » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls