This code will not run on my machine. It is a Windows 10 pro system. The compiler says the code is OK. But error Invalid Handle on line 25 generates.
Does anyone know what is wrong?
You guys are close, but missing the point entirely.
Line 25 is an error as hardware images don't have a destination handle to go to. They go to their own designated screen automagically.
This is the line in question:
Code: (Select All)
_PutImage (0, 0), s10, s
This is the correct syntax:
Code: (Select All)
_PutImage (0, 0), s10
It's that simple.
Now the problem after it compiles and runs is that hardware images only last a single frame. That END immediately after is going to erase the screen instantly and go to the standard software screen of "Press any key to quit".
Notice how I've trapped that hardware display inside a loop here so you can see it and interact with it, before the program ends:
01-31-2026, 08:18 PM (This post was last modified: 01-31-2026, 08:19 PM by bplus.)
(01-31-2026, 07:10 PM)SMcNeill Wrote: You guys are close, but missing the point entirely.
Line 25 is an error as hardware images don't have a destination handle to go to. They go to their own designated screen automagically.
This is the line in question:
Code: (Select All)
_PutImage (0, 0), s10, s
This is the correct syntax:
Code: (Select All)
_PutImage (0, 0), s10
It's that simple.
Now the problem after it compiles and runs is that hardware images only last a single frame. That END immediately after is going to erase the screen instantly and go to the standard software screen of "Press any key to quit".
Notice how I've trapped that hardware display inside a loop here so you can see it and interact with it, before the program ends:
The only real change (besides some stuff for the display loop) was just removing that destination parameter on the hardware image.
maybe so, but the question remains did Frederick originally intend on using a hardware image? becuase he does not explicitly state that he was and his code looks like an experiment with images, I wont know for sure until he says one way or the other. I hope he will reply to this and not be another hit and run.
(01-31-2026, 07:10 PM)SMcNeill Wrote: You guys are close, but missing the point entirely.
Line 25 is an error as hardware images don't have a destination handle to go to. They go to their own designated screen automagically.
This is the line in question:
Code: (Select All)
_PutImage (0, 0), s10, s
This is the correct syntax:
Code: (Select All)
_PutImage (0, 0), s10
It's that simple.
Now the problem after it compiles and runs is that hardware images only last a single frame. That END immediately after is going to erase the screen instantly and go to the standard software screen of "Press any key to quit".
Notice how I've trapped that hardware display inside a loop here so you can see it and interact with it, before the program ends: