Restored from previous forum. Originally posted by Fangbeast.
In my code, I do a Select/endselect and when I press the #About button, it GOSUBs to the below code. The first time, it show the below code and I can close the window. If I press the same button again, it gets stuck in a loop. This code cannot get any simpler than this, can anyone tell me what I have missed please?
About_Home_Inventory:
If MessageRequester("Copyright PeriTek Visions April 2002", "This program is fubarred." ,#PB_MessageRequester_Ok)
EndIf
Return
Fangles Fixed!! Paul showed me where I (ahem) stuffed up an important event check (sigh)
Edited by - Fangbeast on 21 June 2002 07:52:22
Event looping for no reason (That I can see)
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Franco.
Fangles, this works for me:
...maybe you should show a little bit more of your code?
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.
Fangles, this works for me:
Code: Select all
If OpenWindow(0, 200, 200, 200,200,#PB_Window_SystemMenu,"About Fangles...")
CreateGadgetList(WindowID())
ButtonGadget(1,50,45,100,100,"About")
Repeat
EventID.l = WaitWindowEvent()
Select EventID
Case #PB_EventGadget
Select EventGadgetID()
Case 1
Gosub About_Home_Inventory
EndSelect
EndSelect
Until EventID = #PB_EventCloseWindow
EndIf
End
About_Home_Inventory:
If MessageRequester("Copyright PeriTek Visions April 2002", "This program is refurbished :)" ,#PB_MessageRequester_Ok)
EndIf
Return
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Fangbeast.
And I put in several blushes too:):):):)
Fangles
Kind of you to answer Franco but didn't you see my edit to my original message where I said "Fangles Fixed!! Paul showed me where I (ahem) stuffed up an important event check (sigh)"Fangles, this works for me:...maybe you should show a little bit more of your code?Code: Select all
If OpenWindow(0, 200, 200, 200,200,#PB_Window_SystemMenu,"About Fangles...") CreateGadgetList(WindowID()) ButtonGadget(1,50,45,100,100,"About") Repeat EventID.l = WaitWindowEvent() Select EventID Case #PB_EventGadget Select EventGadgetID() Case 1 Gosub About_Home_Inventory EndSelect EndSelect Until EventID = #PB_EventCloseWindow EndIf End About_Home_Inventory: If MessageRequester("Copyright PeriTek Visions April 2002", "This program is refurbished :)" ,#PB_MessageRequester_Ok) EndIf Return
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.
And I put in several blushes too:):):):)
Fangles