Posts: 9
Threads: 5
Joined: 02.02.2025
Posts: 38
Threads: 5
Joined: 27.05.2024
28.01.2026, 13:37
(This post was last modified: 28.01.2026, 15:11 by Jules Marchildon.)
Eros, many thanks for posting! A different take hex viewer than I've seen before w.r.t. the cross-hair highlighting aspects. I like it very much!
Posts: 38
Threads: 5
Joined: 27.05.2024
Eros, I had a chance to review your code. Thanks again!
I noticed the cursor wasn't changing for me when hovering over the scroll bar, it remained I-beam cursor. I added an extra line to make sure it changes to the arrow cursor and a couple minor safe improvements inside HexCtrl_WndProc().
Code:
CASE %WM_SETCURSOR
'-should only change the cursoer when LOWORD(lParam) = %HTCLIENT,
' otherwise Windows resets it right after you call SetCursor
IF LOWRD(lParam) <> %HTCLIENT THEN EXIT SELECT
IF wParam <> hWnd THEN EXIT SELECT
pState = HexCtrl_GetState(hWnd)
'-If you exit the SELECT without returning FUNCTION = 1 then
' windows will call DefWindowProc which resets the cursor back to I-beam.
'IF pState = 0 THEN EXIT SELECT
IF pState = 0 THEN FUNCTION = 0 :EXIT FUNCTION '-safer option.
Posts: 9
Threads: 5
Joined: 02.02.2025
28.01.2026, 18:07
(This post was last modified: 28.01.2026, 18:09 by Eros Olmi.)
I am happy it can help.
Also considering code was almost 95% written by AI by continuous prompting.
I just made few manual corrections when AI mixed syntax from other programming languages not compatible with PB10.
But also, in that case I instructed AI to fix and learn.
It took me a total of around not consecutive 2 hours to write code.
I started with OpenAI ChatGPT Pro but after some time and code size ... it started to forget about previous prompting and new features started to destroy already working code.
So, I got the whole code and continue with Google free Gemini and I have to say it was a little better feeling.
Only problem with free plan was that token consumption was too fast, so instructed it not to add anything not asked by me otherwise at every prompt Gemini is, in general, too prolific.
I'm using AI systems for any aspect of my job and I have to say I got a lot of ideas and in particular many different unexpected and interesting point of view on things.
thinBasic Programming Language
https://www.thinbasic.com
Computer: DELL Precision 7550
OS: Windows 10 Pro for Workstations
Processor: Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz 2.81 GHz
RAM: 32,0 GB
Desktop resolution: 3840 x 2160 Scale 200%
Posts: 9
Threads: 5
Joined: 02.02.2025
Maybe this post can be move to "Source Code" forum.
My fault
thinBasic Programming Language
https://www.thinbasic.com
Computer: DELL Precision 7550
OS: Windows 10 Pro for Workstations
Processor: Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz 2.81 GHz
RAM: 32,0 GB
Desktop resolution: 3840 x 2160 Scale 200%
Posts: 112
Threads: 9
Joined: 13.05.2024
02.02.2026, 10:32
(This post was last modified: 02.02.2026, 10:32 by Albert Richheimer.)
(02.02.2026, 06:52)Eros Olmi Wrote: Maybe this post can be move to "Source Code" forum.
Done. But not into "Source Code" section, as this is restricted to PowerBASIC code. Now we're here in "Alternatives to PowerBASIC".
„Let the machine do the dirty work.“
The Elements of Programming Style, Brian W. Kernighan, P. J. Plauger 1978
Posts: 9
Threads: 5
Joined: 02.02.2025
02.02.2026, 14:12
(This post was last modified: 02.02.2026, 14:14 by Eros Olmi.)
What I posted is 100% working 10.4 PowerBasic code.
Maybe I had to better specify about it.
thinBasic Programming Language
https://www.thinbasic.com
Computer: DELL Precision 7550
OS: Windows 10 Pro for Workstations
Processor: Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz 2.81 GHz
RAM: 32,0 GB
Desktop resolution: 3840 x 2160 Scale 200%
Posts: 112
Threads: 9
Joined: 13.05.2024
Ok, sorry. Didn't realize that it is PowerBASIC source code. :-)
„Let the machine do the dirty work.“
The Elements of Programming Style, Brian W. Kernighan, P. J. Plauger 1978