I have taken a "bad habit" by always using LBB to make my programs
![Wink ;)](./images/smilies/icon_e_wink.gif)
But when it comes to a problem I can't solve by myself and need help that might come from the LB forum, I have to go "back" to LB.
I have made a program that will use multiple windows, 3 in all but for now, let's do it with 2.
I can make it work in LBB but not in LB....and I don't know how to do it in LB
![Sad :(](./images/smilies/icon_e_sad.gif)
Here is my extremely simplified code working in LBB. For now, it doesn't do anything else but opening the FIRST or the SECOND window at will.
NOMAINWIN
[FIRST]
WindowWidth = 400
WindowHeight = 200
UpperLeftX = int((DisplayWidth-WindowWidth)/2)
UpperLeftY = int((DisplayHeight-WindowHeight)/2)
MENU #FIRST,"Windows","First",[FIRST],"Second",[SECOND]
MENU #FIRST,"Exit","Exit",[QUIT.ALL]
STATICTEXT #FIRST, "FIRST WINDOW", 20, 10,200, 20
CLOSE #SECOND
OPEN "FIRST WINDOW" FOR window_nf AS #FIRST
#FIRST "TRAPCLOSE [QUIT.ALL]"
WAIT
[SECOND]
WindowWidth = 400
WindowHeight = 200
UpperLeftX = int((DisplayWidth-WindowWidth)/2)
UpperLeftY = int((DisplayHeight-WindowHeight)/2)
MENU #SECOND,"Windows","First",[FIRST],"Second",[SECOND]
MENU #SECOND,"Exit","Exit",[QUIT.ALL]
STATICTEXT #SECOND, "SECOND WINDOW", 20, 10,200, 20
CLOSE #FIRST
OPEN "SECOND WINDOW" FOR window_nf AS #SECOND
#SECOND "TRAPCLOSE [QUIT.ALL]"
WAIT
[QUIT.ALL]
CLOSE #SECOND
CLOSE #FIRST
END
This is the error message I get when using the same code in LB4.5.1 editor.
Can I make this work in LB4?