This is a workaround module for DPI issues encountered by each requester.
For more details, see the comments in the code.
Update 1:
Minor changes.
DeclareModule DPIAwarenessRequester
;- DeclareModule - DPIAwarenessRequester
;- Issues for each requester due to DPI changes. Moving a requester ...
Search found 518 matches
- Sat Feb 21, 2026 12:38 pm
- Forum: Tricks 'n' Tips
- Topic: [Windows] DPI awareness Per Monitor v2
- Replies: 4
- Views: 2258
- Wed Feb 18, 2026 9:09 am
- Forum: Windows
- Topic: Sleep mode
- Replies: 7
- Views: 435
Re: Sleep mode
According to the answer from AI, it is only possible if you turn off hibernation mode.
To force a Windows PC into normal sleep mode (S3) rather than hibernation (S4) using Win32 methods,
you must ensure hibernation is disabled,
as the Win32 SetSuspendState function often defaults to hibernation ...
To force a Windows PC into normal sleep mode (S3) rather than hibernation (S4) using Win32 methods,
you must ensure hibernation is disabled,
as the Win32 SetSuspendState function often defaults to hibernation ...
- Mon Feb 09, 2026 11:52 am
- Forum: Coding Questions
- Topic: [Windows] Colorizing things...
- Replies: 13
- Views: 795
Re: [Windows] Colorizing things...
You can see this by opening the aero.msstyles file using msstyleEditor. (https://github.com/nptr/msstyleEditor)
- Mon Feb 09, 2026 11:06 am
- Forum: Coding Questions
- Topic: [Windows] Colorizing things...
- Replies: 13
- Views: 795
Re: [Windows] Colorizing things...
If it's just dark mode rather than coloring, you can do it as shown below.
The dark theme part of the statusbar likely isn't present in all builds of Windows 10, but it should be included starting from the first Windows 10 build that supported Explorer's dark theme, though I'm not sure which ...
The dark theme part of the statusbar likely isn't present in all builds of Windows 10, but it should be included starting from the first Windows 10 build that supported Explorer's dark theme, though I'm not sure which ...
- Sun Feb 08, 2026 9:48 am
- Forum: Tricks 'n' Tips
- Topic: [Windows] DPI awareness Per Monitor v2
- Replies: 4
- Views: 2258
Re: [Windows] DPI awareness Per Monitor v2
This is prototype code for thread-safe.
Compared to thread-unsafe code, it has limitations.
It can only be compiled in PB 6.1x or later versions, and in future PB versions, the code may need to be modified to work.
The MS Detours library is required.
The PB's DesktopScaled/DesktopUnscaled ...
Compared to thread-unsafe code, it has limitations.
It can only be compiled in PB 6.1x or later versions, and in future PB versions, the code may need to be modified to work.
The MS Detours library is required.
The PB's DesktopScaled/DesktopUnscaled ...
- Sat Feb 07, 2026 1:32 pm
- Forum: Coding Questions
- Topic: CryptRandomData() Odd behavior
- Replies: 11
- Views: 335
Re: CryptRandomData() Odd behavior
As SMaag's comment pointed out, it's problematic because it may contain invalid character values, and the number of characters read in your code is also incorrect.
However, rather than using PeekS directly, it is recommended to verify that each byte of the data generated by the CryptRandomData ...
However, rather than using PeekS directly, it is recommended to verify that each byte of the data generated by the CryptRandomData ...
- Sat Feb 07, 2026 1:18 pm
- Forum: Coding Questions
- Topic: A piece of code Delphi into PB
- Replies: 9
- Views: 486
Re: A piece of code Delphi into PB
GeoidData(i, j) = ((*Ptr\w & $FF) << 8) | ((*Ptr\w & $FF00) >> 8)
& $FF and & $FF00 is switchted!
if work with 16Bit values the & $FF .. is not needed
GeoidData(i, j) = ((*Ptr\w) << 8) | ((*Ptr\w) >> 8)
; or use Macro
Macro BSwap16(_WordValue)
((_WordValue<<8 | _WordValue>>8) & $FFFF ...
- Tue Feb 03, 2026 12:13 pm
- Forum: Coding Questions
- Topic: [Resolved] Focus WebViewGadget() error
- Replies: 7
- Views: 365
Re: Focus WebViewGadget() error
Unfortunately, Windows only.
- Tue Feb 03, 2026 11:59 am
- Forum: Coding Questions
- Topic: [Resolved] Focus WebViewGadget() error
- Replies: 7
- Views: 365
Re: Focus WebViewGadget() error
Since the WebView gadget intercepts keyboard shortcut inputs, you must handle it as shown below.
EnableExplicit
Enumeration window
#app
EndEnumeration
Enumeration gadgets
#editor
#webView
EndEnumeration
Enumeration menu
#viewCode
#viewResult
EndEnumeration
Declare scintillaCallBack(gadget ...
EnableExplicit
Enumeration window
#app
EndEnumeration
Enumeration gadgets
#editor
#webView
EndEnumeration
Enumeration menu
#viewCode
#viewResult
EndEnumeration
Declare scintillaCallBack(gadget ...
- Sat Jan 31, 2026 1:50 pm
- Forum: General Discussion
- Topic: Findstring, Is this a bug?
- Replies: 9
- Views: 1050
Re: Findstring, Is this a bug?
But I would agree that the BOM better should be skipped automatically to make it easier to work with that kind of text files.
There is the #PB_File_BOM flag, but it cannot be used with the #PB_Any value due to an error.
https://www.purebasic.fr/english/viewtopic.php?t=88265
;
;
NewList ...
- Sat Jan 31, 2026 1:37 pm
- Forum: Bugs - Windows
- Topic: I've got BOOM
- Replies: 1
- Views: 1770
Re: I've got BOOM
Confirmed.
The OpenFile function has the same problem.
file.s = GetTemporaryDirectory() + "bom_test.txt"
If CreateFile(0, file, #PB_File_BOM)
WriteStringN(0, "test")
CloseFile(0)
If OpenFile(0, file, #PB_File_BOM) ; no error.
;If ReadFile(0, file, #PB_File_BOM) ; no error.
CloseFile(0 ...
The OpenFile function has the same problem.
file.s = GetTemporaryDirectory() + "bom_test.txt"
If CreateFile(0, file, #PB_File_BOM)
WriteStringN(0, "test")
CloseFile(0)
If OpenFile(0, file, #PB_File_BOM) ; no error.
;If ReadFile(0, file, #PB_File_BOM) ; no error.
CloseFile(0 ...
- Sat Jan 31, 2026 9:57 am
- Forum: Bugs - Windows
- Topic: [Done] 6.40 a2 - fixed string assigning issue
- Replies: 1
- Views: 699
[Done] 6.40 a2 - fixed string assigning issue
The same error occurs in both cases.
Procedure.s s(a.s, b.s)
Protected a0.s{100}
Protected b0.s{100}
Protected r.s
a0 = a
b0 = b
r = a0 + b0
ProcedureReturn r
EndProcedure
a.s = "1234"
b.s = "5678"
Debug s(a, b)
Define a.s = "1234"
Define b.s = "5678"
Define a0.s{100}
Define b0.s{100 ...
Procedure.s s(a.s, b.s)
Protected a0.s{100}
Protected b0.s{100}
Protected r.s
a0 = a
b0 = b
r = a0 + b0
ProcedureReturn r
EndProcedure
a.s = "1234"
b.s = "5678"
Debug s(a, b)
Define a.s = "1234"
Define b.s = "5678"
Define a0.s{100}
Define b0.s{100 ...
- Mon Jan 26, 2026 2:48 pm
- Forum: Bugs - Windows
- Topic: [Done] PB640a1 bug with list
- Replies: 6
- Views: 2107
Re: PB640a1 bug with list
The error occurs regardless of the purifier setting.Fred wrote: Mon Jan 26, 2026 2:40 pm Does it happen everytime ? Is purifier on ? I can't reproduce it here
- Mon Jan 26, 2026 2:41 pm
- Forum: Bugs - Windows
- Topic: [Done] PB640a1 : bug with date
- Replies: 3
- Views: 1050
Re: PB640a1 : bug with date
Confirmed.
Invalid memory access. (read error at address 906756288)
- Mon Jan 26, 2026 10:51 am
- Forum: Tricks 'n' Tips
- Topic: [Windows] DPI awareness Per Monitor v2
- Replies: 4
- Views: 2258
Re: [Windows] DPI awareness Per Monitor v2
CAUTION : StartDPIAction and StopDPIAction calls must be paired.
As a side note:
I tested using the PostEvent() and BindEvent() functions, but the custom event only fired when the mouse button was released, making it impossible to change the size of gadgets in real time.
I discovered that when ...
As a side note:
I tested using the PostEvent() and BindEvent() functions, but the custom event only fired when the mouse button was released, making it impossible to change the size of gadgets in real time.
I discovered that when ...