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 ...
Search found 166 matches
- Wed Aug 27, 2025 8:08 am
- Forum: Coding Questions
- Topic: [SOLVED] FindString() with CRLF in the search?
- Replies: 12
- Views: 443
- 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: 650
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 ...
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 ...
- 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: 650
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
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
- Tue Jul 15, 2025 8:06 am
- Forum: Tricks 'n' Tips
- Topic: morse code player
- Replies: 12
- Views: 1048
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 ...
- Sun May 18, 2025 11:42 pm
- Forum: Coding Questions
- Topic: Round(0.51, #PB_Round_Nearest) <> {debug integer 0.51}
- Replies: 17
- Views: 1968
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 ...
- Sat May 10, 2025 12:16 am
- Forum: Bugs - Windows
- Topic: Problem printing some unicode characters to canvas gadget
- Replies: 10
- Views: 2824
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 ...
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 ...
- Sat Apr 26, 2025 10:49 pm
- Forum: Off Topic
- Topic: School is not the place for hackers
- Replies: 18
- Views: 4459
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 ...
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 ...
- Sun Apr 20, 2025 10:54 am
- Forum: Bugs - Windows
- Topic: Problem printing some unicode characters to canvas gadget
- Replies: 10
- Views: 2824
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.
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.
- Sun Apr 20, 2025 9:08 am
- Forum: Bugs - Windows
- Topic: Problem printing some unicode characters to canvas gadget
- Replies: 10
- Views: 2824
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
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
- Sun Apr 20, 2025 6:14 am
- Forum: Bugs - Windows
- Topic: Problem printing some unicode characters to canvas gadget
- Replies: 10
- Views: 2824
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 ...
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 ...
- Sat Mar 29, 2025 7:55 am
- Forum: Off Topic
- Topic: Please don't smoke!
- Replies: 24
- Views: 9737
Re: Please don't smoke!
Smoking reduces the chance of getting Parkinson's and can ease the symptoms.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 is many times worse than Parkinson's so I would be crazy to start.
Smoking is evil.
- Mon Mar 24, 2025 10:15 pm
- Forum: Coding Questions
- Topic: Serial Communication locking up.
- Replies: 11
- Views: 812
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 ...
- Mon Mar 24, 2025 6:54 am
- Forum: Coding Questions
- Topic: Serial Communication locking up.
- Replies: 11
- Views: 812
Re: Serial Communication locking up.
I expect that you are sending to the device too quickly for it to process.
Try putting a delay in the loop
If that works, gradually decrease the delay until it fails.
Try putting a delay in the loop
If that works, gradually decrease the delay until it fails.
- Tue Nov 12, 2024 10:17 pm
- Forum: Linux
- Topic: qt on linux 22.04
- Replies: 3
- Views: 3320
Re: qt on linux 22.04
Thanks for the link.
Reading it, all we should need is "sudo apt-get install qtbase5-dev"
I asked him to install the full developer packages(as listed in the easy install thread) and that worked so I will have to set up a clean VM to test.
Linux doesn't seem to be very good at backwards ...
Reading it, all we should need is "sudo apt-get install qtbase5-dev"
I asked him to install the full developer packages(as listed in the easy install thread) and that worked so I will have to set up a clean VM to test.
Linux doesn't seem to be very good at backwards ...
- Tue Nov 12, 2024 10:10 am
- Forum: Linux
- Topic: qt on linux 22.04
- Replies: 3
- Views: 3320
qt on linux 22.04
I have user who has been happy with my application until he tried Ubuntu 22.04
Bad news. I recently installed Ubuntu on a new (2'nd hand) laptop, and the flavour was Ubuntu 22.04. All my previous installs where Ubuntu 20.04.
In 22.04 the qt5-default library does not exist anymore (the WebKit is ...
Bad news. I recently installed Ubuntu on a new (2'nd hand) laptop, and the flavour was Ubuntu 22.04. All my previous installs where Ubuntu 20.04.
In 22.04 the qt5-default library does not exist anymore (the WebKit is ...