|
Post by Chris Iverson on Jul 29, 2021 17:10:17 GMT -5
There aren't any bmp button images hard-coded in the LB language. The BMPs that the example code is referencing are installed alongside the sample code that comes with LB. (Check your LB code folder, there should be a bmp folder in there.)
|
|
|
Post by Rod on Jul 30, 2021 2:27:39 GMT -5
Here is a little demo using 40x40 bmps for the keypad and 25x25 bmps for the buttons. If you describe the size and content of the bmps you need they are easy to pull together. gamebin.webs.com/Liberty/keypad.zip
|
|
curly
Full Member
Posts: 161
|
Post by curly on Jul 30, 2021 4:35:36 GMT -5
Hi Rod, I'm now showing how much of a novice I am - I can't do anything with your attachment? I've double clicked, try to open, unable to open the .bas file in LB or word? Help!
However, playing with the Bmp buttons, they will be perfect for the inspection defects and tickboxes. I had another idea and bingo, each textbox has some static text indicating what it is for, I have used the button that calls the popup keypad to hold the that text. It now looks better and is so slick!
Chris, I've searched the LB directory in c:Program Fies (x86) \ Liberty BASIC 4.5.1 \ lb4help \ LibertyBASIC_4_web \ and all sub-directories, but can't find any .bmp files?
Kind regards, David
|
|
|
Post by Rod on Jul 30, 2021 7:10:25 GMT -5
When you click on the .zip file Windows Explorer will open it and show you the files. You need to click on Extract All at the top of the window. Windows will extract the files to a folder called keypad. Open that and run the .bas.
The .bmp files are in the User Appdata folder, Thats where Windows mandates all support files are stored. Open Explore , the Windows folder icon, key %appdata% into the search bar at the top of the window then navigate to Liberty BASIC v4.5.1 and then \bmp
|
|
curly
Full Member
Posts: 161
|
Post by curly on Aug 1, 2021 7:25:59 GMT -5
Hi Rod and Chris,
Found the appdata folder and all the buttons thank you, and I've successfully opened your zip file. I could get good at this if I was a bit younger!
I'm up to 6700 lines so far, and just spent 2 hours trying to break it. Still going strong!
I'll be back soon I'm sure.
Kind regards, David
|
|
curly
Full Member
Posts: 161
|
Post by curly on Aug 1, 2021 8:10:28 GMT -5
Hi Rod, I'm currently studying your bmp button demo and see something you have used before that I thought may have been a typo? a line reads, if tbt then, but doesn't include what? I can see tbt is a variable that is set to 1 or zero and monitors if the window is already open to avoid it crashing, but 'if tbt' what? Could this mean, if tbt is more than zero? ...and can it be used for any variable to avoid writing, if varaiable > 0 then?
Kind regards, David
|
|
|
Post by tsh73 on Aug 1, 2021 12:56:30 GMT -5
LB does not have dedicated Boolean type (true/false) so 0 is false, not 0 is true
The only weird one is not() function It produces not(0) as '-1', which is of cource not 0, but quite different from '1' which is result of comparison.
print 1<2 'true x=1<2 print x if x then print "+" else print "-"
print not(x) print not(not(x))
So if you check for "x" you actually checking for "x<>0" (really not sure about floating point one, does it work reasonably or if it has meaning at all)
x=1 '1 is True print x if x then print "+" else print "-"
x=0 '0 is false print x if x then print "+" else print "-"
x=100 'actually, any non-zero is true print x if x then print "+" else print "-"
x=-100 'even negative one print x if x then print "+" else print "-"
|
|
|
Post by Rod on Aug 1, 2021 15:30:42 GMT -5
Yep if tbt = 1 then close the currently open window before starting out fresh.
|
|