This can be done much simpler:
Procedure GadgetFit (gadget.i)
Protected.i w_req, h_req
w_req = GadgetWidth (gadget, #PB_Gadget_RequiredSize)
h_req = GadgetHeight(gadget, #PB_Gadget_RequiredSize)
If w_req <> GadgetWidth(gadget) Or h_req <> GadgetHeight(gadget)
ResizeGadget(gadget, #PB ...
Search found 3935 matches
- Mon Sep 29, 2025 4:14 pm
- Forum: Feature Requests and Wishlists
- Topic: GadgetFit(gadget) command
- Replies: 2
- Views: 142
- Sun Sep 28, 2025 11:55 am
- Forum: Windows
- Topic: Crashes while using the IDE
- Replies: 7
- Views: 367
Re: [PB6.30b2] Crashes while using the IDE
Who says this problem was caused by the PureBasic IDE?marcoagpinto wrote: Sun Sep 28, 2025 9:21 am But today it was Windows 11 that crashed and self-rebooted ("Windows encountered a problem blah blah").
- Sat Sep 27, 2025 6:22 pm
- Forum: Coding Questions
- Topic: PB IDE font setup ...
- Replies: 9
- Views: 336
Re: PB IDE font setup ...
I have a similar problem: my computer doesn't run on steam power. It seems I have to use electricity.marc_256 wrote: Sat Sep 27, 2025 3:57 pm Hi Demivec,
I did this already, but then I lose all my graphic characters (Page437).
only when I use the OEM-US character set I can use the Page437 character set.
Marc

- Tue Sep 23, 2025 10:11 pm
- Forum: Feature Requests and Wishlists
- Topic: UseSVGImageDecoder/Encoder
- Replies: 35
- Views: 1758
Re: UseSVGImageDecoder/Encoder
The description of that project sounds very promising. Thanks for posting the link!
- Fri Sep 19, 2025 11:07 pm
- Forum: Feature Requests and Wishlists
- Topic: UseSVGImageDecoder/Encoder
- Replies: 35
- Views: 1758
- Wed Sep 17, 2025 8:34 am
- Forum: Coding Questions
- Topic: PB 6.21 x64: Invalid variable names with umlauts are truncated after the umlaut in the debugger's error description
- Replies: 5
- Views: 463
Re: PB 6.21 x64: Invalid variable names with umlauts are truncated after the umlaut in the debugger's error description
That's not what he reported as a bug.mk-soft wrote: Wed Sep 17, 2025 8:17 am but a rule in the programming that no special characters may be used (ÄÖÜ, etc)
This is not only the case with PureBasic
The reported bug is the faulty error message.
- Tue Sep 16, 2025 9:04 pm
- Forum: Bugs - Windows
- Topic: [Done] UncompressPackFile() should preserve modification times
- Replies: 3
- Views: 713
[Done] UncompressPackFile() should preserve modification times
When I recently used PB's built-in packer lib for the first time, I was flabbergasted to see that after unpacking files from an archive, all file modification times are set to the current time.
; Code tested with:
; PB 6.30 beta 2 (x64) on Windows 11
EnableExplicit
UseZipPacker()
#Mask ...
; Code tested with:
; PB 6.30 beta 2 (x64) on Windows 11
EnableExplicit
UseZipPacker()
#Mask ...
- Thu Sep 11, 2025 10:11 am
- Forum: Tricks 'n' Tips
- Topic: Get current UNIX UTC time (Windows)
- Replies: 8
- Views: 625
Re: Get current UNIX UTC time (Windows)
I know, but it's only implemented in PB 6.10+.
- Thu Sep 11, 2025 9:59 am
- Forum: Tricks 'n' Tips
- Topic: Get current UNIX UTC time (Windows)
- Replies: 8
- Views: 625
Re: Get current UNIX UTC time (Windows)
Code: Select all
; cross-platform code
; tested with PB 5.73, 6.04, 6.21
ImportC ""
time(*tm=#Null)
EndImport
Procedure.q UTC ()
; return value: current UTC in PureBasic format
ProcedureReturn time()
EndProcedure
; -- Demo
Debug FormatDate("%yyyy-%mm-%dd %hh:%ii:%ss", UTC())
- Thu Sep 04, 2025 4:01 pm
- Forum: Tricks 'n' Tips
- Topic: Subscriber/Observer Pattern
- Replies: 6
- Views: 836
- Thu Sep 04, 2025 4:00 pm
- Forum: Bugs - Windows
- Topic: [Done] Virtual list works in 6.21 but not int 6.30beta1
- Replies: 15
- Views: 1436
Re: Virtual list works in 6.21 but not int 6.30beta1
+ 1NicTheQuick wrote: Thu Sep 04, 2025 3:48 pm Since Purebasic can be compiled for Linux, Windows, and Mac, I would advise against designing commands in such a way that they allow OS-specific constants. This will only lead to code that is no longer cross-platform.
- Thu Sep 04, 2025 11:33 am
- Forum: Tricks 'n' Tips
- Topic: Subscriber/Observer Pattern
- Replies: 6
- Views: 836
Re: Subscriber/Observer Pattern
Hi, some remarks.
Since this is in the “Tricks 'n' Tips” section of the forum, it wouldbe good if the code is as educational and straightforward as possible.
In the above procedure RemoveObsererver(), there is no need to use an index variable together with SelectElement(). And SelectElement() is ...
Since this is in the “Tricks 'n' Tips” section of the forum, it wouldbe good if the code is as educational and straightforward as possible.
In the above procedure RemoveObsererver(), there is no need to use an index variable together with SelectElement(). And SelectElement() is ...
- Tue Sep 02, 2025 9:00 am
- Forum: Bugs - IDE
- Topic: [PB 6.30 beta 1] Obsolete preference
- Replies: 0
- Views: 684
[PB 6.30 beta 1] Obsolete preference
The IDE still offers the option to check for LTS releases, although there are no new LTS releases anymore. 



- Sat Aug 30, 2025 1:09 am
- Forum: General Discussion
- Topic: Is PureBasic dead?
- Replies: 21
- Views: 2710
Re: Is PureBasic dead?
Agreed.idle wrote: Sat Aug 30, 2025 12:56 am [...] but the forum seems to be a little dead on user engagement, though that's another matter, how do we get people talking, sharing and collaborating?
- Fri Aug 29, 2025 2:29 pm
- Forum: General Discussion
- Topic: Is PureBasic dead?
- Replies: 21
- Views: 2710