Search found 2660 matches

by Michael Vogel
Thu Feb 19, 2026 8:45 am
Forum: Coding Questions
Topic: [Windows, Solved] Changing StatusBar field width
Replies: 5
Views: 352

[Windows, Solved] Changing StatusBar field width

Thanks to all of your responses, now we have three working alternatives to choose from:
- standard Purebasic with a brute force fix
- standard statusbar doing additional resizing
- using a gadget

The following code does show all three methods:


; Define

Enumeration
#BarDefaultStatusbar ...
by Michael Vogel
Wed Feb 18, 2026 7:13 am
Forum: Coding Questions
Topic: [Windows, Solved] Get rid of 3D border in Progressbar
Replies: 6
Views: 349

Re: [Windows, Solved] Get rid of 3D border in Progressbar

Ooh - I didn't see the wood for the trees, thank you so much.
by Michael Vogel
Tue Feb 17, 2026 7:47 pm
Forum: Coding Questions
Topic: [Windows, Solved] Get rid of 3D border in Progressbar
Replies: 6
Views: 349

Re: [Windows] Get rid of 3D border in Progressbar

Still fighting with the frame appearing when resizing a progressbar gadget. Got some hints but it is still not solved.

Actual state (see lines below 'Case 40'):
hacking the object style does change the behaviour of the progressbar but a frame get added around the progressbar before being resized ...
by Michael Vogel
Mon Feb 16, 2026 2:27 pm
Forum: Windows
Topic: Sleep mode
Replies: 7
Views: 423

Re: Sleep mode

Not tested:
RunProgram("rundll32.exe","powrprof.dll,SetSuspendState 0,1,0",".")

The following shutdown procedure does work, but doesn't support 'sleep':
Procedure ShutDown(flags)

; Flags:
; EWX_LOGOFF = 0
; EWX_SHUTDOWN = 1
; EWX_REBOOT = 2
; EWX_FORCE = 4
; EWX_POWEROFF = 8

Protected ...
by Michael Vogel
Mon Feb 16, 2026 11:06 am
Forum: The PureBasic Editor
Topic: A complete code browser for PureBasic [Windows]
Replies: 87
Views: 61766

Re: A complete code browser for PureBasic [Windows]

Thanks for this great tool!

I've downloaded the version 1.01 and got some errors because there are twelve elements in a gadget list but the last two elements do not have ID's.

I added the following lines within the PrefWindows source code for a quick fix:

Procedure PW_SetFontsToPWGadgets ...
by Michael Vogel
Mon Feb 16, 2026 9:06 am
Forum: Coding Questions
Topic: [Windows, Solved] Get rid of 3D border in Progressbar
Replies: 6
Views: 349

Re: [Windows] Get rid of 3D border in Progressbar

Thanks, I have tried your #1 already before - which would have been my preferred way but it fails here (Windows 11, PB6.21). Was not clever enough for #2, but also the container doesn't fix the problem :cry:

Added the following line directly after the #PB_Event_Timer line but there's no single bit ...
by Michael Vogel
Sun Feb 15, 2026 6:31 pm
Forum: Coding Questions
Topic: [Windows, Solved] Get rid of 3D border in Progressbar
Replies: 6
Views: 349

[Windows, Solved] Get rid of 3D border in Progressbar

I started a thread showing the difficulties changing the width of statusbar fields when using a progressar - not sure if the behaviour can be called a bug or it's just 'unsupported'.

When trying to find a woraround I embedded a ProgressBarGadget instead the use of a StatusBarProgress - but as soon ...
by Michael Vogel
Sat Feb 14, 2026 1:39 pm
Forum: Coding Questions
Topic: [Windows, Solved] Changing StatusBar field width
Replies: 5
Views: 352

Re: [Windows] Changing StatusBar field width

Correct, insn't this done in the procedure StatusBarFieldWidth in the initial post?

Field 0 starts at position 0, the first value in the array is the length of the field 0 (and also the left position of the field 1), the seond value in the array is the total length of field 0 and field 1 (which is ...
by Michael Vogel
Sat Feb 14, 2026 9:17 am
Forum: Coding Questions
Topic: [Windows, Solved] Changing StatusBar field width
Replies: 5
Views: 352

[Windows, Solved] Changing StatusBar field width

I'd like to change the width of some statusbar fields but wondering why a progressbar won't be affected (or effected?) automatically.

The following example shows that text fields are updated as wanted (top button) but when changing the field to a progress bar (press bottom button once) changing the ...
by Michael Vogel
Wed Feb 11, 2026 2:00 pm
Forum: Coding Questions
Topic: [Windows] Colorizing things...
Replies: 13
Views: 778

Re: [Windows] Colorizing things...

I am still playing around with all your fine examples above to create a simple solution...
Rashad's code is nearly perfect but for changing the textcolor needs extra work: it seems to need additional gadgets (and so the system font) or callbacks (mk-soft's code).

So I did a mix now (including MK's ...
by Michael Vogel
Tue Feb 10, 2026 6:17 pm
Forum: Coding Questions
Topic: [Windows] Colorizing things...
Replies: 13
Views: 778

Re: [Windows] Colorizing things...

Thanks for all your ideas and snippets, I'll try to extract the best things of all of them :lol:

The result is much longer than 50 lines, and there are many reasons for that:
- standard font for the statusbar
- vertical centering needs minimum DPI adjustments
- colorizing the caption and the ...
by Michael Vogel
Mon Feb 09, 2026 10:30 pm
Forum: Coding Questions
Topic: [Windows] Colorizing things...
Replies: 13
Views: 778

Re: [Windows] Colorizing things...

Thanks, that's a good one - but only when doing dark mode only...

I'd need full colors...

Enumeration DWMWINDOWATTRIBUTE
#DWMWA_USE_IMMERSIVE_DARK_MODE= 20
#DWMWA_BORDER_COLOR= 34
#DWMWA_CAPTION_COLOR= 35
#DWMWA_TEXT_COLOR= 36
EndEnumeration

PrototypeC.i DwmSetWindowAttribute(hwnd.i ...
by Michael Vogel
Sun Feb 08, 2026 1:44 pm
Forum: Coding Questions
Topic: [Windows] Colorizing things...
Replies: 13
Views: 778

[Windows] Colorizing things...

Hi, creating a dark mode for windows programs seems to be a little bit tricky...

There are only few gadget types which can be colrized by using the purebasic function SetGadgetColor, all others needs callbacks. Adjusting the window caption is not a big deal (see here or second code below) but the ...
by Michael Vogel
Fri Feb 06, 2026 8:56 am
Forum: The PureBasic Editor
Topic: Debug Output Text color
Replies: 6
Views: 428

Re: Debug Output Text color

Something like that, yes...

I know that I can do such things with #PB_Compiler_Line and #PB_Compiler_Procedure (see macro below) but it would be helpful to have such information automatically (could be shown in extra columns of a listicon gadget or only when hovering around with the mouse).

This ...
by Michael Vogel
Wed Feb 04, 2026 6:54 pm
Forum: Tricks 'n' Tips
Topic: Autocomplete on StringGadget
Replies: 8
Views: 952

Re: Autocomplete on StringGadget

Found a small issue, I've entered the following keys (after F5 and Tab):

@ J 'down' 'Enter' 'Enter' 'Enter'

then "@Jérome érome érome" in seen in the edit field.