But it behaves strangely with PB 5.10b5 (x86, MacOSX).
The button (in the main window) disappears when clicked.
After the second Window is displayed, both the windows can't be closed anymore...
Changing the buttongadget number to 1, prevents the button from disappearing, but the windows are still freezing...
Code: Select all
;Compile into a threadsafe dynlib / DLL "TestWindow.so" "TestWindow.dll"
ProcedureDLL TestWindow()
If OpenWindow(0, #PB_Ignore, #PB_Ignore, 200, 100, "DLL Window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
ButtonGadget(0,50,50,100,22,"OK")
Repeat
Event = WaitWindowEvent()
If Event=#PB_Event_Gadget
Break
EndIf
Until Event = #PB_Event_CloseWindow
CloseWindow(0)
EndIf
EndProcedure
Code: Select all
;Compile into a threadsafe executable
CompilerIf #PB_Compiler_OS=#PB_OS_Windows
#DLLExt$=".dll"
CompilerElse
#DLLExt$=".so"
CompilerEndIf
If OpenLibrary(0,#PB_Compiler_FilePath+"TestWindow"+#DLLExt$)
If OpenWindow(0, #PB_Ignore, #PB_Ignore, 200, 200, "Main Window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
ButtonGadget(0,25,25,150,22,"Test DLL Window")
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Gadget
CallFunction(0,"TestWindow")
EndIf
Until Event = #PB_Event_CloseWindow
EndIf
EndIf