The main event loop should be able to handle both windows.
If you don't require any window-specific control, this would suffice:
Win1 = OpenWindow(#PB_Any, 300, 300, 300, 150, "Main Window", #PB_Window_SystemMenu)
Win1Text = TextGadget(#PB_Any, 20, 50, 260, 30, "Elapsed: 0 sec")
AddWindowTimer ...
Search found 2603 matches
- Fri Dec 12, 2025 11:49 am
- Forum: Coding Questions
- Topic: Update a seperate Logging window
- Replies: 5
- Views: 187
- Tue Dec 09, 2025 4:52 am
- Forum: The PureBasic Form Designer
- Topic: Not a function, Array, List, Map Or Macro
- Replies: 12
- Views: 597
Re: Not a function, Array, List, Map Or Macro
Perfect, then. Linux configurations can prove to be a little slippery, sometimes.MikeGreen99 wrote: Mon Dec 08, 2025 10:05 pm I got it working. After modding .bashrc I forgot to boot.
If you may require any further clarifications, as you come to grasps with the intricacies of PureBasic, we're always here.
- Mon Dec 08, 2025 6:26 am
- Forum: The PureBasic Form Designer
- Topic: Not a function, Array, List, Map Or Macro
- Replies: 12
- Views: 597
Re: Not a function, Array, List, Map Or Macro
It depends on the Linux distro, but you'd usually have to export the variable in the profile or bashrc file. And preferably add PureBasic to the path variable as well.
- Sun Dec 07, 2025 8:49 pm
- Forum: The PureBasic Form Designer
- Topic: Not a function, Array, List, Map Or Macro
- Replies: 12
- Views: 597
Re: Not a function, Array, List, Map Or Macro
The FormDesigner forced the name of my Form to Window_0 . Can I change this ? What if I had multiple .pbf Forms, would they all use Window_0 ? How would the Main Program distinguish one .pbf Form from another ?
Simply change the variable name of the window in the properties window of the form ...
Simply change the variable name of the window in the properties window of the form ...
- Sun Dec 07, 2025 11:02 am
- Forum: Coding Questions
- Topic: Question about Drag and Drop Events
- Replies: 6
- Views: 280
Re: Question about Drag and Drop Events
I was expecting a sort of "symmetry" where all the drag and drop events would be at the same level in my event loop code. But since #PB_Event_GadgetDrop is a window event and #PB_EventType_DragStart is a gadget event, they aren't.
So, your question is, why not just add a corresponding drop event ...
So, your question is, why not just add a corresponding drop event ...
- Sat Dec 06, 2025 5:01 am
- Forum: The PureBasic Form Designer
- Topic: Not a function, Array, List, Map Or Macro
- Replies: 12
- Views: 597
Re: Not a function, Array, List, Map Or Macro
If I add:
OpenTestForm01()
to the form "FormTest01.pbf", I will lose this line as the Form Code is continually being regenerated.
We shouldn't add anything to the form code files. They are automatically-generated files and will continue to regenerate as the form is edited, purging all ...
OpenTestForm01()
to the form "FormTest01.pbf", I will lose this line as the Form Code is continually being regenerated.
We shouldn't add anything to the form code files. They are automatically-generated files and will continue to regenerate as the form is edited, purging all ...
- Fri Dec 05, 2025 7:42 pm
- Forum: General Discussion
- Topic: My First Post - Hello
- Replies: 18
- Views: 905
Re: My First Post - Hello
For constants, FormDesigner uses Named Enumeration. For different form files, you also have to use different names for constants and variables to avoid conflicts.
For large multi-codebase projects, even named enumerations could pose a problem if the various enumerator labels don't align. And with ...
For large multi-codebase projects, even named enumerations could pose a problem if the various enumerator labels don't align. And with ...
- Fri Dec 05, 2025 3:22 pm
- Forum: General Discussion
- Topic: My First Post - Hello
- Replies: 18
- Views: 905
Re: My First Post - Hello
...disable the #PB_Any setting in FormDesigner. I think it's better to use constants with enumerations for the GUI instead of lots of variables.
I'm sure that coding styles are personal choices, but PureBasic's humble #PB_Any directive hides a very powerful dynamic object numbering system, which ...
I'm sure that coding styles are personal choices, but PureBasic's humble #PB_Any directive hides a very powerful dynamic object numbering system, which ...
- Thu Dec 04, 2025 9:24 am
- Forum: Coding Questions
- Topic: Watchdog tool for crashed programs?
- Replies: 15
- Views: 1644
Re: Watchdog tool for crashed programs?
... These were not my mistakes, but from snippets by others in these forums. ...
Forum snippets are usually quick & dirty examples to simply illustrate core concepts of the questions being asked.
Even when lifted from the tips & tricks section, they are usually generic, abridged versions lacking ...
Forum snippets are usually quick & dirty examples to simply illustrate core concepts of the questions being asked.
Even when lifted from the tips & tricks section, they are usually generic, abridged versions lacking ...
- Thu Dec 04, 2025 6:18 am
- Forum: The PureBasic Form Designer
- Topic: Disabling "Generate event procedure" deletes event procedure in already existing form with event procedures?
- Replies: 4
- Views: 216
Re: Disabling "Generate event procedure" deletes event procedure in already existing form with event procedures?
...if disabling "Generate event procedure" also makes changes to already made forms, it would be difficult to have different projects that use different event handling methods...
I would believe that this is a somewhat buggy behaviour , because as you said, it could break projects that were ...
I would believe that this is a somewhat buggy behaviour , because as you said, it could break projects that were ...
- Wed Dec 03, 2025 9:34 pm
- Forum: The PureBasic Form Designer
- Topic: Not a function, Array, List, Map Or Macro
- Replies: 12
- Views: 597
Re: Not a function, Array, List, Map Or Macro
...the first portion of my program which dies on line 4
If OpenTestForm01() exists and is a valid window procedure in your form file, and the form file is in the same folder as your executable, this should work:
#ProgramTitle = "TestForm01.pb"
#ProgramVersion = "v1.00.0 MG"
XIncludeFile ...
If OpenTestForm01() exists and is a valid window procedure in your form file, and the form file is in the same folder as your executable, this should work:
#ProgramTitle = "TestForm01.pb"
#ProgramVersion = "v1.00.0 MG"
XIncludeFile ...
- Wed Dec 03, 2025 6:29 pm
- Forum: Feature Requests and Wishlists
- Topic: Case insensitive CountString
- Replies: 2
- Views: 242
Re: Case insensitive CountString
Could CountString get the same Mode parameter as FindString please?
#PB_String_CaseSensitive: case sensitive search (a=a) (default).
#PB_String_NoCase : case insensitive search (A=a).
I currently have to have two copies of a string around for counting, original case and lower case.
In ...
- Sun Nov 30, 2025 8:42 am
- Forum: Coding Questions
- Topic: What is the difference between a binary file on different OS?
- Replies: 6
- Views: 472
Re: What is the difference between a binary file on different OS?
Although they all implement the common Linux kernel, each distro is compiled differently, and with different dependencies as well.
So, the toolchains, build configs, graphic systems, etc, would work differently.
- Thu Nov 27, 2025 6:58 am
- Forum: Off Topic
- Topic: Can current AI understand PureBasic and....
- Replies: 12
- Views: 1045
Re: Can current AI understand PureBasic and....
Love it or hate it, it's here to stay. So, may as well get used to it.
It's ELIZA, forty years in the making. :lol:
But seriously, it's a machine, albeit with a plethora of ethical and real-world ramifications. Sentience may not be possible, but what is it, anyway?
Meanwhile, let's just enjoy ...
It's ELIZA, forty years in the making. :lol:
But seriously, it's a machine, albeit with a plethora of ethical and real-world ramifications. Sentience may not be possible, but what is it, anyway?
Meanwhile, let's just enjoy ...
- Sat Nov 22, 2025 5:43 pm
- Forum: Coding Questions
- Topic: I need code that demonstrates how to switch between independent windows.
- Replies: 8
- Views: 582
Re: I need code that demonstrates how to switch between independent windows.
Hello again, @Jan2004.
As most have highlighted, multiple calls to the WaitWindowEvent() function is not recommended. Even if your modal windows are in separate code files, they will be integrated into the calling code and should thus merge with its main event loop.
Alternatively, the binding ...
As most have highlighted, multiple calls to the WaitWindowEvent() function is not recommended. Even if your modal windows are in separate code files, they will be integrated into the calling code and should thus merge with its main event loop.
Alternatively, the binding ...