|
Post by Rod on Apr 28, 2019 12:32:46 GMT -5
I cant get past this code
WindowWidth = 1000+w WindowHeight = 600+h UpperLeftX = (DisplayWidth-WindowWidth)/2 UpperLeftY = (DisplayHeight-WindowHeight)/2 graphicbox #w.g, 0,0,802,602 graphicbox #w.tb, 802,0,200,602 open "Liberty BASIC Chess" for window_nf as #w #w "trapclose quit" #w.g "down" #w.tb "down ;backcolor lightgray; color black" loadbmp "tbx","c:\atemp\chess\text.bmp" #w.tb "drawbmp tbx 0 0 " wait
gets error "message not understood #imageNamed:ifAbsent:" it stops on the drawbmp line. if I don't use the full path I get file not found error on the previous line.
|
|
|
Post by Carl Gundel on Apr 28, 2019 16:37:00 GMT -5
I cant get past this code WindowWidth = 1000+w WindowHeight = 600+h UpperLeftX = (DisplayWidth-WindowWidth)/2 UpperLeftY = (DisplayHeight-WindowHeight)/2 graphicbox #w.g, 0,0,802,602 graphicbox #w.tb, 802,0,200,602 open "Liberty BASIC Chess" for window_nf as #w #w "trapclose quit" #w.g "down" #w.tb "down ;backcolor lightgray; color black" loadbmp "tbx","c:\atemp\chess\text.bmp" #w.tb "drawbmp tbx 0 0 " wait
gets error "message not understood #imageNamed:ifAbsent:" it stops on the drawbmp line. if I don't use the full path I get file not found error on the previous line. Instead of drawbmp try this: #w.tb drawimage("tbx", 0, 0) I will work on supporting the form that you tried to use for the sake of backwards compatibility.
|
|
|
Post by Rod on May 1, 2019 4:51:08 GMT -5
I was still having bother, whatever I tried I could not get the bmp to load and show. Turns out it is a [data] statement later in the sub that is causing the problem. I have a list of data statements headed up by a [data] branch statement that I restore to. This code will refuse to load the image because of the [data] branch.
nomainwin call fillboard wait
sub fillboard
WindowWidth = 1000 WindowHeight = 600 UpperLeftX = (DisplayWidth-WindowWidth)/2 UpperLeftY = (DisplayHeight-WindowHeight)/2 graphicbox #w.g, 0,0,802,602 graphicbox #w.tb, 802,0,200,602
open "Liberty BASIC Chess" for window as #w #w "trapclose quit" #w.g "down" #w.tb "down ;backcolor lightgray; color black" loadimage "tbx","c:\atemp\chess\text.bmp" #w.tb drawimage("tbx",0,0)
[data] end sub
|
|