Search found 48 matches

by Gérard
Thu Dec 26, 2024 5:42 pm
Forum: Coding Questions
Topic: Detect invalid Connection ID prior
Replies: 6
Views: 1221

Re: Detect invalid Connection ID prior

Code: Select all

OnErrorGoto(?ErrorHandler)

ClientID = 750154536	;Random invalid Connection ID

sent = SendNetworkString(ClientID, "Hello"); Returns Invalid memory accesss

ErrorHandler:
;Error handling
by Gérard
Mon Dec 16, 2024 1:34 pm
Forum: Off Topic
Topic: Good PAID Software -- Your Favorites
Replies: 73
Views: 52339

Re: Good PAID Software -- Your Favorites

CCleaner Pro
Nord VPN
Proton VPN
PureBasic
Molotov (Live TV and Replay)
UCheck
and many others.
by Gérard
Sat Dec 07, 2024 11:36 am
Forum: Feature Requests and Wishlists
Topic: Allow Enter key to action gadgets
Replies: 19
Views: 5909

Re: Allow Enter key to action gadgets

Enumeration Window
#WinApp
EndEnumeration

If OpenWindow(#WinApp, 0, 0, 222, 70, "ButtonGadgets", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(0, 10, 10, 200, 20, "Standard Button")
ButtonImageGadget(1, 10, 40, 200, 20, 9)
SetActiveGadget(0)
Repeat
ev = WaitWindowEvent ...
by Gérard
Tue Dec 03, 2024 4:07 pm
Forum: Coding Questions
Topic: DPI problem
Replies: 3
Views: 592

Re: DPI problem

Who does the questions and answers now? :)
by Gérard
Mon Nov 11, 2024 5:44 pm
Forum: Feature Requests and Wishlists
Topic: Mouse and Keyboard Events should be available for Windows!
Replies: 13
Views: 2550

Re: Mouse Events should be available for Windows!

If OpenWindow(0,0,0,320,200,#Null$,#PB_Window_SystemMenu|#PB_Window_WindowCentered)
Repeat
Event=WaitWindowEvent(20)
;
Select Event
;=== EVENTS SOURIS ===
Case #WM_LBUTTONUP : Debug "LEFT BUTTON UP"
Case #WM_LBUTTONDOWN : Debug "LEFT BUTTON DOWN"
Case #WM_LBUTTONDBLCLK : Debug "LEFT BUTTON ...
by Gérard
Wed Oct 18, 2023 12:26 am
Forum: Coding Questions
Topic: [Solved]ButtonGadget toggle
Replies: 4
Views: 730

Re: ButtonGadget toggle

Hello,

Another approach I use in my applications: EnableExplicit

Enumeration Windows
#WinMain
EndEnumeration

Enumeration Menus
#MenuMain
EndEnumeration

Enumeration MenuItems
#MenuClose
EndEnumeration

Enumeration Gadget
#Button
#ButtonEnd=#Button+5
EndEnumeration

Define Event, indexMenu ...
by Gérard
Wed Sep 06, 2023 11:49 pm
Forum: Bugs - IDE
Topic: Windows: opening a .pb file from Explorer when the IDE is already open doesn't make it take foreground focus
Replies: 5
Views: 5202

Re: Windows: opening a .pb file from Explorer when the IDE is already open doesn't make it take foreground focus

It works for me in version 6.00 LTS, or I don't understand your problem.
If I launch PB and select a pb file in explorer, it opens in the IDE and the tab has focus.
If the IDE is not in the foreground, then it comes to the foreground as desired.
If I minimize the IDE to the taskbar before opening a ...
by Gérard
Wed Aug 30, 2023 1:03 am
Forum: Coding Questions
Topic: Fetching JSON value
Replies: 5
Views: 1801

Re: Fetching JSON value

I created a file from your data to analyze the data and extract each value.

FILE$="json-file.json"
JSON = ReadFile(#PB_Any, FILE$)
If JSON
While Eof(JSON) = 0
JSON_STRING$ + ReadString(JSON)
Wend
CloseFile(JSON)
EndIf

;Debug JSON_STRING$

Structure usage ; Not used
prompt_tokens.s ; text or ...
by Gérard
Tue Aug 29, 2023 10:42 am
Forum: General Discussion
Topic: Bug with #PB_Compiler_ExecutableFormat ???
Replies: 5
Views: 1229

Re: Bug with #PB_Compiler_ExecutableFormat ???

Thanks for the confirmation, maybe Fred can fix this in the next version of PB

Gérard
by Gérard
Tue Aug 29, 2023 12:43 am
Forum: General Discussion
Topic: Bug with #PB_Compiler_ExecutableFormat ???
Replies: 5
Views: 1229

Bug with #PB_Compiler_ExecutableFormat ???

Hello,
Can you check if by modifying the menu Compiler/Compiler Options.../Executable format: with the 3 possible values, there is indeed a bug with the Shared Dll option
The Windows and Console options do return the correct value for #PB_Compiler_ExecutableFormat, but the Shared Dll option returns ...
by Gérard
Tue Aug 22, 2023 9:55 pm
Forum: Tricks 'n' Tips
Topic: UDP Server and client
Replies: 13
Views: 4877

Re: UDP Server and client

Hello,

Thank you very much, I would not hesitate.

Sorry for my english, i am French and i live in France.

Gérard
by Gérard
Sun Aug 20, 2023 11:09 pm
Forum: Tricks 'n' Tips
Topic: UDP Server and client
Replies: 13
Views: 4877

Re: UDP Server and client

My knowledge is limited, but always ready to learn.

Thanks for the info, everything is working fine now.

Gérard Repeat
sendLine = Input()
If sendLine = "q"
Break
Else
lenSendLine = StringByteLength(sendLine)
If lenSendLine
SendNetworkData(connectionID, @sendLine, lenSendLine)
EndIf
EndIf ...
by Gérard
Sun Aug 20, 2023 7:47 pm
Forum: Tricks 'n' Tips
Topic: UDP Server and client
Replies: 13
Views: 4877

Re: UDP Server and client

If the client sends qwertyuiop, the server receives qwert

If the client sends qwertyuiopqwertyuiop, the client receives qwertyuiop

The server receives only half of the string sent by the client.

The received buffer length is always correct.

I tried this, and it works. Repeat
sendLine = Input ...
by Gérard
Fri Aug 18, 2023 11:11 pm
Forum: Tricks 'n' Tips
Topic: Advanced Path Requester [Windows]
Replies: 3
Views: 996

Re: Advanced Path Requester [Windows]

Hi,
I'm not KCC, but I appreciate this code.
It will be very useful to me.
G