Posted: Mon Jan 27, 2003 9:50 am
Restored from previous forum. Originally posted by CLAUDE PATRICK.
in my appli, i would open a second window ( info, param... )
but when i close it, all the command in the main window will not work !
WHY ? i don't know !!!
my source code :
@+
Patrick Claude
39, rue de la Chaume
88160 Le Thillot
in my appli, i would open a second window ( info, param... )
but when i close it, all the command in the main window will not work !
WHY ? i don't know !!!
my source code :
Code: Select all
Procedure Dlg_info()If OpenWindow(1, 0, 0, 100, 50, #PB_Window_ScreenCentered | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget, "Info")
If CreateGadgetList(WindowID())
TextGadget(1,5,5,200,20,"hello world")
EndIf
Repeat
EventID.l = WaitWindowEvent()
Select EventID
Case #PB_Event_CloseWindow
Quit = 2
EndSelect
Until Quit = 2
Quit = 0
EndIf
CloseWindow(1)
EndProcedure
If OpenWindow(0, 0, 0, 320, 50, #PB_Window_ScreenCentered | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget, "PureBasic Window")
If CreateGadgetList(WindowID())
StringGadget(1,5,5,200,20,"")
ButtonGadget(2,210,5,50,20,"Ok")
ButtonGadget(3,265,5,50,20,"Dlg")
EndIf
Repeat
EventID.l = WaitWindowEvent()
Select EventID
Case #PB_Event_Gadget
Select EventGadgetID()
Case 2
If GetGadgetText(1)=""
SetGadgetText(1,"hello world")
Else
SetGadgetText(1,"")
EndIf
Case 3
Dlg_info()
UseWindow(0) ; or ActivateWindow() = nothing
EndSelect
Case #PB_Event_CloseWindow
Quit = 1
EndSelect
Until Quit = 1
EndIf
End
Patrick Claude
39, rue de la Chaume
88160 Le Thillot