Search found 1145 matches

by User_Russian
Fri Nov 21, 2025 8:32 pm
Forum: Coding Questions
Topic: Create Modal Window
Replies: 5
Views: 173

Re: Create Modal Window

; Main Window
Enumeration Window
#MainWindow
EndEnumeration

Enumeration Gadget
#OpenModalButton
EndEnumeration

Declare ModalWindow()

If OpenWindow(#MainWindow, 100, 100, 400, 300, "Main Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(#OpenModalButton, 100, 100, 200 ...
by User_Russian
Sat Nov 08, 2025 5:12 pm
Forum: Coding Questions
Topic: [SOLVED] Module Declaration Order
Replies: 5
Views: 673

Re: [SOLVED] Module Declaration Order

How should functions in mod2 be declared so that it could be called from mod1? Workaround for one-pass compiler. ; module 1

DeclareModule mod1
Declare add(a, b)
Declare modAdd(a, b)
EndDeclareModule

Module mod1
Procedure add(a, b)
ProcedureReturn a + b
EndProcedure

Procedure modAdd(a ...
by User_Russian
Fri Nov 07, 2025 1:18 pm
Forum: Bugs - Windows
Topic: [Done] How to find the reason for compiler-problems?
Replies: 11
Views: 785

Re: How to find the reason for compiler-problems?

BarryG, tested in PB 6.30 b4.
by User_Russian
Fri Nov 07, 2025 1:13 pm
Forum: Bugs - Windows
Topic: [Done] How to find the reason for compiler-problems?
Replies: 11
Views: 785

Re: How to find the reason for compiler-problems?

One line is needed for the crash compiler.

Code: Select all

Declare test2(*t1.point, *t2.struct)
by User_Russian
Tue Nov 04, 2025 9:36 pm
Forum: Announcement
Topic: PureBasic 6.30 beta 4 is ready !
Replies: 117
Views: 23472

Re: PureBasic 6.30 beta 4 is ready !


What data return function IsHID()? If it is not a pointer to a structure hid_device , then how can one get it?
I figured out how to do it. Procedure HID_ID(HID)
Protected id=0

id = IsHID(HID)
If id
id=PeekI(id)
EndIf

ProcedureReturn id
EndProcedure The procedure will return a pointer to ...
by User_Russian
Sun Nov 02, 2025 5:20 pm
Forum: Announcement
Topic: PureBasic 6.30 beta 4 is ready !
Replies: 117
Views: 23472

Re: PureBasic 6.30 beta 4 is ready !

Tested the HID library in the project FM tuner for PC (text is on russian language, use google-translate) on Windows, Linux and MacOS and it works stably.
by User_Russian
Sat Nov 01, 2025 3:35 pm
Forum: Announcement
Topic: PureBasic 6.30 beta 4 is ready !
Replies: 117
Views: 23472

Re: PureBasic 6.30 beta 4 is ready !

What data return function IsHID()? If it is not a pointer to a structure hid_device, then how can one get it?
by User_Russian
Wed Oct 29, 2025 8:05 pm
Forum: Bugs - C backend
Topic: Can not use a structure in an Import
Replies: 12
Views: 2140

Re: Can not use a structure in an Import

idle wrote: Wed Oct 29, 2025 7:55 pmMaybe it's from the LTO stage
Does PB use LTO (Link Time Optimization)?
But if so, it would be a linker error, not a compiler error.
by User_Russian
Wed Oct 29, 2025 11:12 am
Forum: Coding Questions
Topic: $FF0000FF <> RGBA(255, 0, 0, 255) .... why?
Replies: 12
Views: 607

Re: $FF0000FF <> RGBA(255, 0, 0, 255) .... why?

Code: Select all

Color1.l=$FF0000FF
Color2.i=$FF0000FF
Debug Color1 ; -16776961
Debug Color2 ; 4278190335
Debug RGBA(255, 0, 0, 255) ; -16776961
by User_Russian
Wed Oct 29, 2025 10:31 am
Forum: Bugs - C backend
Topic: Can not use a structure in an Import
Replies: 12
Views: 2140

Re: Can not use a structure in an Import

Maybe there is Inline assembler code?
by User_Russian
Tue Oct 28, 2025 7:31 pm
Forum: Bugs - C backend
Topic: PB 6.30 b4 - API calls and multithreading
Replies: 1
Views: 522

Re: PB 6.30 b4 - API calls and multithreading

// r = CreateSemaphore_(#Null, 0, 1, "Semaphore"+ProgID)
SYS_PushStringBasePosition();
SYS_PushStringBasePosition();
SYS_CopyString(_S1);
SYS_CopyString(v_progid);
SYS_IncrementStringBasePosition();
integer p2=(integer)SYS_PopStringBasePositionValueNoUpdate();
integer r0=f_createsemaphore_(0,0,1,p2 ...
by User_Russian
Tue Oct 28, 2025 12:36 pm
Forum: Bugs - C backend
Topic: PB 6.30 b4 - API calls and multithreading
Replies: 1
Views: 522

PB 6.30 b4 - API calls and multithreading

Procedure RunOnce()
Protected Res=#False, r, ProgID.s

ProgID=UCase(StringFingerprint(GetCurrentDirectory(), #PB_Cipher_SHA1))
r = CreateSemaphore_(#Null, 0, 1, "Semaphore"+ProgID)
If r<>0
If GetLastError_()=#ERROR_ALREADY_EXISTS ; Копия приложения уже запущена.
CloseHandle_(r)
Res=#True ...
by User_Russian
Sat Oct 25, 2025 9:12 pm
Forum: Bugs - Linux
Topic: PB 6.30 b4 - #PB_Window_BorderLess|#PB_Window_Tool
Replies: 1
Views: 750

PB 6.30 b4 - #PB_Window_BorderLess|#PB_Window_Tool

OpenWindow(0, 0, 0, 400, 100, "", #PB_Window_Invisible|#PB_Window_BorderLess|#PB_Window_Tool|#PB_Window_NoActivate)
HideWindow(0, #False)
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow When using flags #PB_Window_BorderLess and #PB_Window_Tool, in Linux Mint for PC when using ...
by User_Russian
Sat Oct 25, 2025 8:12 pm
Forum: Bugs - Linux
Topic: PB 6.30 b4 - specified #SysTray is not initialised
Replies: 1
Views: 649

PB 6.30 b4 - specified #SysTray is not initialised

;
; ------------------------------------------------------------
;
; PureBasic - SysTray example file
;
; (c) Fantaisie Software
;
; ------------------------------------------------------------
;
; Note: on some Linux distributions (like Ubuntu), the systray icons can be hidden by default. For more ...