Search found 169 matches

by TassyJim
Sat Oct 11, 2025 1:02 am
Forum: Linux
Topic: PB6.21, 6.3b2 RPi Wayland WindowX() and WindowY()
Replies: 2
Views: 619

Re: PB6.21, 6.3b2 RPi Wayland WindowX() and WindowY()

Thanks for the explanation Fred.

My application runs faster with Wayland but not being able to position the windows is not ideal.
I will have to reconsider the use of Wayland.

Thanks again
by TassyJim
Sat Sep 27, 2025 11:37 pm
Forum: Coding Questions
Topic: PB IDE font setup ...
Replies: 9
Views: 516

Re: PB IDE font setup ...

Extended ASCII characters depend on the code page. Windows has forgotten about code pages since unicode became the standard.
For a project I wrote, this is the CP437 unicode equivalents.
; CodePage 437
[CodePage]
chr00 = $0000 ; NULL
chr01 = $263a ; START OF HEADING
chr02 = $263b ; START OF TEXT ...
by TassyJim
Sun Sep 21, 2025 8:37 am
Forum: Linux
Topic: PB6.21, 6.3b2 RPi Wayland WindowX() and WindowY()
Replies: 2
Views: 619

PB6.21, 6.3b2 RPi Wayland WindowX() and WindowY()

With my RPi and Wayland support enabled, Windows always start centered and WindowX() and WindowY() return zero.

If OpenWindow(0, 10, 10, 300, 300, "Move me !", #PB_Window_SystemMenu | #PB_Window_SizeGadget)
Repeat
Event = WaitWindowEvent()
If event = #PB_Event_SizeWindow Or event = #PB_Event ...
by TassyJim
Wed Aug 27, 2025 8:08 am
Forum: Coding Questions
Topic: [SOLVED] FindString() with CRLF in the search?
Replies: 12
Views: 828

Re: FindString() with CRLF in the search?

It works for me. PB6.21
search.s = #CRLF$+"Word"
filename$ = "C:\\apps\teststr.txt"
If OpenFile(0,filename$)
text.s = ReadString(0,#PB_Ascii | #PB_File_IgnoreEOL)
CloseFile(0)
EndIf
text2.s = "first line"+#CRLF$+"Word beginning second line."+#CRLF$+"last line."

Debug StringByteLength(text) ;102 ...
by TassyJim
Wed Aug 27, 2025 4:24 am
Forum: Coding Questions
Topic: Window goes to maximum after monitor turned off and on again
Replies: 10
Views: 1008

Re: Window goes to maximum after monitor turned off and on again

I think that Windows reverts to a default size of 1024 x 768 when it looses connection to the monitor.
This forces your window to full screen and then when the monitor is restored, the full screen stays full screen.

When I tried your code with 1024 x 750, it survived the monitor loss correctly ...
by TassyJim
Tue Aug 26, 2025 4:05 am
Forum: Coding Questions
Topic: Window goes to maximum after monitor turned off and on again
Replies: 10
Views: 1008

Re: Window goes to maximum after monitor turned off and on again

I could confirm the problem.
adding #PB_Window_SizeGadget fixed it for me.

If you want to prevent users resizing, you can detect the resize with #PB_Event_SizeWindow and restore the size.

Jim
by TassyJim
Tue Jul 15, 2025 8:06 am
Forum: Tricks 'n' Tips
Topic: morse code player
Replies: 12
Views: 1239

Re: morse code player


Wouldn't it be possible to just look at volume changes of the signal?
Very early morse code recordings from a telegraph are just clicks, no sine waves.

If you are listening to RF signals and have a good narrow CW filter in the radio, using signal amplitude would work well.

In my Z80 days, I ...
by TassyJim
Sun May 18, 2025 11:42 pm
Forum: Coding Questions
Topic: Round(0.51, #PB_Round_Nearest) <> {debug integer 0.51}
Replies: 17
Views: 2092

Re: Round(0.51, #PB_Round_Nearest) <> {debug integer 0.51}


Why the non-explicit double-to-integer converter has a light different behaviour, compared to the Round() native function ?


It is the same as Int(), not Round()

This function returns an integer value. To get a quad value, use the IntQ() function.

The integer part is created by cutting off ...
by TassyJim
Sat May 10, 2025 12:16 am
Forum: Bugs - Windows
Topic: [Done] Problem printing some unicode characters to canvas gadget
Replies: 11
Views: 3804

Re: Problem printing some unicode characters to canvas gadget

Thanks for trying Fred.
I can work around it for now.

Edit
The fix I implemented is
Procedure DrawTextEx(hDc,x, y, Text.s, FrontColor, BackColor)
Protected chRect.RECT
chRect\left = x
chRect\top = y
chRect\right = x + VT\CharPixelW
chrect\bottom = y + VT\CharPixelH

SetTextColor_(hdc ...
by TassyJim
Sat Apr 26, 2025 10:49 pm
Forum: Off Topic
Topic: School is not the place for hackers
Replies: 18
Views: 4604

Re: School is not the place for hackers

I remember my first day at university.
We were told "You thought you came here to learn to be engineers. Wrong. You are here to learn how to learn."
If only all school teaching had the same philosophy.

At the opposite end of the scale, a teacher once told my class "You don't need to know about that ...
by TassyJim
Sun Apr 20, 2025 10:54 am
Forum: Bugs - Windows
Topic: [Done] Problem printing some unicode characters to canvas gadget
Replies: 11
Views: 3804

Re: Problem printing some unicode characters to canvas gadget

Fred,
V6.10 has the same issue.
I don't have any earlier version installed.
Characters are displayed correctly in a TextGadget but not on the canvas.
Vector graphics display correctly so the characters are present in the font.
by TassyJim
Sun Apr 20, 2025 9:08 am
Forum: Bugs - Windows
Topic: [Done] Problem printing some unicode characters to canvas gadget
Replies: 11
Views: 3804

Re: Problem printing some unicode characters to canvas gadget

I notice that your TextGadget text is not correct either.
You don't seem to have Chr($23fb) available. (looks like a power switch)

I just tested Vector text and it DOES print the characters correctly.

Jim
by TassyJim
Sun Apr 20, 2025 6:14 am
Forum: Bugs - Windows
Topic: [Done] Problem printing some unicode characters to canvas gadget
Replies: 11
Views: 3804

[Done] Problem printing some unicode characters to canvas gadget

PB6.20 and PB6.21 beta6
I have a strange problem printing some Unicode characters to a canvas gadget.
The characters I have found so far are
Chr($2370)+Chr($23fb)+Chr($23f5)+Chr($2315)+Chr($29f2)
They render as a hollow box unless I include a "magic" character in the string.

One of the magic ...
by TassyJim
Sat Mar 29, 2025 7:55 am
Forum: Off Topic
Topic: Please don't smoke!
Replies: 24
Views: 9943

Re: Please don't smoke!

Piero wrote: Fri Mar 28, 2025 2:33 pm Weird P.S.:
Very recent scientific studies say nicotine helps fighting (some) BAD virus infections…
Smoking reduces the chance of getting Parkinson's and can ease the symptoms.

Smoking is many times worse than Parkinson's so I would be crazy to start.
Smoking is evil.
by TassyJim
Mon Mar 24, 2025 10:15 pm
Forum: Coding Questions
Topic: Serial Communication locking up.
Replies: 11
Views: 1278

Re: Serial Communication locking up.


Should the data not just be stored or not sent until the receiving device gives the send signal?


9600 is very slow. The buffer is too small to hold the 10 strings.
I am not sure what happens with a full buffer and handshaking.

mk-soft is right, in a real program, put the serial code into a ...