There is classic basic program for Commodore 64 computer to print maze on the screen. This program random prints “/” and “\” character on screen. I wanted to implement same program on modern computer and print the result. Not only to print, but also, use print preview.
Original C64 program:
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
After some investigation I found in the internet the best option for MS Visual Studio Express VB (.net). This software “set” allows to print the same stuff to windows form image, printer preview control or to real printer output. This is not very straight, with some hack, but source code is self explanative. Thanks to MS for making it so strange.
Program is very simple- demo button to invoke various types of functions: print, printer setup, page setup, print preview… With small change it is posible to use same graphics commands to picturebox object.
Program read “page setup” settings and adjust parameters for print. Still there is bug when changing paper orientation, but I think it is solvable.