Hello,
I want to write an application that has one main window (and when it is closed I do NOT want
the whole application to exit but e.g. minimize to the system tray instead) and the main
window will have a few buttons, list icon gadgets, etc.
Double clicking a list icon gadget item / clicking on a button would open another window, that
itself can have gadgets as well.
What is the best way to handle several windows (that partially depend on another) when designing
the application, should each window reside in it's own procedure and how should events
for such a (sub)-window be handled?
Sorry, newbie here. I want to bring my application over from AutoHotkey to PureBasic...
App with multiple windows
Re: App with multiple windows
Create your window, place all gadgets, hide it. Do this with all your windows at the beginning.
If you need to show a window, "unhide" it.
Only one Eventloop.
Thats all.
If you need to show a window, "unhide" it.
Only one Eventloop.
Thats all.
Re: App with multiple windows
Thanks you Bisonte, I'll try that
Re: App with multiple windows
And really:
Only 1 event loop
Bernd
Only 1 event loop
Code: Select all
Repeat
Event = WaitWindowEvent()
Select EventWindow()
Case #MainWindow
Exit = MainWindowEvents(Event)
Case #OtherWindow
OtherWindowEvents(Event)
EndSelect
Until Exit
Re: App with multiple windows
@infratec
Okay, works fine with multiple windows so farOnly 1 event loop