Hot Pockets wrote:My sincere apology to Mr Gaman. I overlooked the fact that My program lost its indentation because I saved it as Text. If I would of known how great Tags were I would of used them,(Great idea!)
Trend:
Thanks for setting me straight. I have already downloaded that book and printed all 350 Pages. Now I gusess it will end up in the dumper along with the money I spent buying PB.I don't think I'll ever be able to learn
PB. It is far more complicated from my point of view then Dark Basic or
Blitz Basic or Visual Basic 4. The only thing I almost learned that had almost as many constants was Ibasic. Again I am not really a programer. I wrote 1 very large Check register program in MS Basic7.11 That works well for me and I've been trying to re=write it for windows. Hah!! I doubt I'll ever suceed I am 80 years old, you never know tho, my health is good. Thanks for all your help!!

No don't give up, it's really not that hard to learn. I never stress over learning a new language. I just roll up my sleves and get my hands dirty. It all makes sense after a while. Did you fix your program? Is this what you were trying to do?
Code: Select all
Declare MainMenu(Width, Height)
LoadImage(0, "C:\test.bmp")
OpenWindow(0, 0, 0, ImageWidth(0), ImageHeight(0), "Command", #PB_Window_BorderLess | #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
ImageGadget(0, 0, 0, 0, 0, ImageID(0))
Delay(2000)
CloseWindow(0)
MainMenu(ImageWidth(0), ImageHeight(0))
Procedure MainMenu(Width, Height)
OpenWindow(1, 0, 0, Width, Height, "Command", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
If CreateMenu(1, WindowID(1))
MenuTitle("File")
MenuItem( 1, "&Load...")
MenuItem( 2, "Save")
MenuItem( 3, "Save As...")
MenuBar()
OpenSubMenu("Recents")
MenuItem( 5, "Pure.png")
MenuItem( 6, "Basic.jpg")
OpenSubMenu("Even more !")
MenuItem( 12, "Yeah")
CloseSubMenu()
MenuItem( 13, "Rocks.tga")
CloseSubMenu()
MenuBar()
MenuItem( 7, "&Quit")
MenuTitle("Edition")
MenuItem( 8, "Cut")
MenuItem( 9, "Copy")
MenuItem(10, "Paste")
MenuTitle("?")
MenuItem(11, "About")
EndIf
DisableMenuItem(1, 3, 1)
DisableMenuItem(1, 13, 1)
; This is the 'event loop'. All the user actions are processed here.
Repeat
Select WaitWindowEvent()
Case #PB_Event_Menu
Select EventMenu() ; To see which menu has been selected
Case 11 ; About
MessageRequester("About", "Cool Menu example", 0)
Default
MessageRequester("Info", "MenuItem: "+Str(EventMenu()), 0)
EndSelect
Case #PB_Event_CloseWindow
Break
EndSelect
ForEver
EndProcedure