QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: bjg201 on December 31, 2020, 07:11:19 pm
-
I just downloaded QB64 on Win 10, 64 bit. How do I print a program listing as there is no PRINT command on the FILE menu.
-
Could copy/paste it into your favorite word processor and print from there.
Otherwise you have to code something.
Welcome to the forum.
-
I almost didn't post this as the IDE is so old now...but you can print source code from my QB64 IDE. Please note, I haven't tested it in Windows 10. Also, my IDE doesn't recognize many new commands found in the current version of QB64, but that shouldn't affect printing.
http://www.qbasicnews.com/dav/projects.php#DAVSIDE (http://www.qbasicnews.com/dav/projects.php#DAVSIDE)
- Dav
-
Let's say you have a program called: myprogram.bas
Open the QB64 IDE and paste in this code...
SHELL _DONTWAIT(START Notepad /min /p myprogram.bas"
Run the program. It's okay that the program is "Untitled." It will still run, without being saved.
So what this does is tell Notepad to open minimized, open your program called myprogram.bas in this example case, and then the /p switch prints it. Note the START command allows the /min switch to be used. It isn't necessary to run Notepad minimized, but it's nice to have it out of the way.
Welcome to the forum, and this is funny, because I was just thinking the other day it would be nice if a PRINT option was added, at some point, to the project. I'm just not sure with all the cross-platform printing issues if that is too complicated an undertaking, and the use, frankly, would be minimal, which would not make this a priority for the dev team.
Hey Dav, you posted while I was writing this.Nice to see your IDE prints, but is it cross-platform compatible?
Pete
-
Hey Pete. No, it's just for Windows Im afraid.
Happy new year to you...
- Dav
-
Thanks for the reply. I was expecting Dav's not here, man! Oh wait, that's my bit.
Happy New Year back at you!
Pete