Printer problems
Printer problems
I am working on a program where I send a "sheet" to the printer. I wanted to print it as dark as possible, so I tried to use "FontBold". This caused the program to crash. I then wrote a small test program(posted below) and got the same results. Does anyone have an idea how for me to procede.
Object canon as printer
canon.fontname = "Courier New"
canon.fontsize = 12
canon.fontbold = true`(If I rem out this line, everything is fine.)
end object
Compiling this gave me this "Runtime error 216 at 00403ca2"
This is on a machine running Windows 98
Mel
Object canon as printer
canon.fontname = "Courier New"
canon.fontsize = 12
canon.fontbold = true`(If I rem out this line, everything is fine.)
end object
Compiling this gave me this "Runtime error 216 at 00403ca2"
This is on a machine running Windows 98
Mel
Printer problems
I think you could simply write
Object canon as printer
fontname = "Courier New"
fontsize = 12
fontbold = true`(If I rem out this line, everything is fine.)
end object
If you define an object, its properties can be declared without the name for the object.
Object canon as printer
fontname = "Courier New"
fontsize = 12
fontbold = true`(If I rem out this line, everything is fine.)
end object
If you define an object, its properties can be declared without the name for the object.
Printer problems
Thanks Magna, I will try that and see if it works. I will post back and let you know.
Mel
Mel
Printer problems
No. The same thing happened. I even tried it a machine running XP and got the same result. It seems that the line "Canon.fontbold = true" causes a problem. I even tried "canon.fontitalic = true" and that caused a crash also. I also tried "dim canon as printer" as the first line and leaving off the statement "end object". That did not help either.
Mel
Mel
Printer problems
I tried it too and got the same error on XP. If you ommit "fontbold", it works but with this setting it crashes.
Two hints: if you use the "Object"-syntax you dont`t need to use the dot-notation. Just use the name of the property as showed before. In this case there is no need to "Dim" it.
Object canon as printer
fontname="Courier New"
fontsize=12
end object
Otherwise you can Dim it, but then you have to set the properties using the dot-notation:
Dim canon As Printer
canon.fontname="Courier New"
canon.fontsize=12
A last hint: remove all whitespaces before and after an equal-sign. I know that FNX has a bug concerning these whitespaces at some place, but I`m not sure if its at this place.
Two hints: if you use the "Object"-syntax you dont`t need to use the dot-notation. Just use the name of the property as showed before. In this case there is no need to "Dim" it.
Object canon as printer
fontname="Courier New"
fontsize=12
end object
Otherwise you can Dim it, but then you have to set the properties using the dot-notation:
Dim canon As Printer
canon.fontname="Courier New"
canon.fontsize=12
A last hint: remove all whitespaces before and after an equal-sign. I know that FNX has a bug concerning these whitespaces at some place, but I`m not sure if its at this place.
Printer problems
Magna, I have not been able to do anymore with the "printer problem". I made some other changes to the program and now I cannot get it to compile. When I get that fixed I will come back to this.
Mel
Mel
Printer problems
If you like to post your code I could try to help you. But the printer problem seems to be unsolvable for now.
Printer problems
I have already solved the problem with not compiling(needed a variable to be global and it was not). The problem with "fontbold" seems to be connected with sending to printer. If you use it while printing to screen, it works fine or it did the little I played with it.
Mel
Mel