Search found 2965 matches

by mk-soft
Sun Oct 17, 2021 10:59 am
Forum: Coding Questions
Topic: StringGadget Vertical?
Replies: 43
Views: 11510

Re: StringGadget Vertical?

Alternatively with a FrameGadget ... Update Procedure GetTextHight(FontID = #PB_Default) Static img Protected r1 If Not img img = CreateImage(#PB_Any, 16, 16) EndIf If StartDrawing(ImageOutput(img)) If FontID : DrawingFont(FontID) : EndIf r1 = TextHeight("X") StopDrawing() EndIf ProcedureR...
by mk-soft
Fri Oct 15, 2021 5:03 pm
Forum: Linux
Topic: Linux Reboot/Shutdown using PB app
Replies: 6
Views: 456

Re: Linux Reboot/Shutdown using PB app

Part from RunAsAdmin and modified ... not testet ... Procedure SuDo(user.s, passwd.s, program.s) Protected cmd.s If user = UserName() cmd.s = "-c " + #DQUOTE$ + "echo " + passwd + " | sudo -S " + program + #DQUOTE$ Else cmd.s = "-c " + #DQUOTE$ + "echo &q...
by mk-soft
Fri Oct 15, 2021 9:10 am
Forum: General Discussion
Topic: Only a 'Tick'
Replies: 1
Views: 463

Re: Only a 'Tick'

Perhaps with own constants

Code: Select all

#QUOTE = 39
#DQUOTE = 34

DataSection
  label:
  Data.a 'D', 'a', 't', 'a', '.', 'a', ' ', #QUOTE, 'D', #QUOTE, ',', #QUOTE, 'a', #QUOTE, ',', #QUOTE, 't', #QUOTE, ',', #QUOTE, 'a', #QUOTE
  Data.a 0
EndDataSection

Debug PeekS(?label, -1, #PB_Ascii)
by mk-soft
Thu Oct 14, 2021 9:19 pm
Forum: Linux
Topic: Linux Reboot/Shutdown using PB app
Replies: 6
Views: 456

Re: Linux Reboot/Shutdown using PB app

Perhaps help ...

Link: viewtopic.php?f=12&t=71693
by mk-soft
Thu Oct 14, 2021 3:36 pm
Forum: General Discussion
Topic: Tablacus Script Control x64
Replies: 1
Views: 339

Re: Tablacus Script Control x64

The TablacusScriptControl X64 uses Microsoft ActiveScript internally.
It can also use ActiveScript directly at PB.

Link: Module ActiveScript for VB-Script ...
by mk-soft
Mon Oct 11, 2021 4:50 pm
Forum: Bugs - C backend
Topic: Structured array memory address with offset not being calculated correctly
Replies: 1
Views: 409

Re: Structured array memory address with offset not being calculated correctly

Its a bug with bracketing Global Dim Array1.point(100,100); Procedure Test() Protected *Src Protected OffsetXY = 3 ;*src = @Array1() + OffsetXY ;/ <- Bug here. ; !p_src=(void*)(((s_point*)a_array1.a)+v_offsetxy) ; <- PB_CompilerC : v_offsetxy is type size s_point (3*8 bytes) ; change code !p_src=(vo...
by mk-soft
Sun Oct 10, 2021 12:28 pm
Forum: Announcement
Topic: PureBasic 6.00 Alpha 5 released !
Replies: 245
Views: 51066

Re: PureBasic 6.00 Alpha 5 released !

You have to add the C-Backend compiler for x86 yourself in the IDE under settings/compiler.
by mk-soft
Sun Oct 10, 2021 12:10 pm
Forum: Feature Requests and Wishlists
Topic: Calling ProcedureReturn from within a loop. More information needed in docs to clarify if this is a valid thing to do.
Replies: 6
Views: 708

Re: Calling ProcedureReturn from within a loop. More information needed in docs to clarify if this is a valid thing to d

But remember that resources you have created yourself must also be released again.
This applies to AllocateMemory, AllocateStructure, dynamic objects with PB_Any (CreateImage, etc).
by mk-soft
Sun Oct 10, 2021 12:03 pm
Forum: Coding Questions
Topic: TreeGadget collapse nodes
Replies: 9
Views: 1194

Re: TreeGadget collapse nodes

You are right,

I look later for windows
by mk-soft
Sun Oct 10, 2021 11:34 am
Forum: Coding Questions
Topic: TreeGadget collapse nodes
Replies: 9
Views: 1194

Re: TreeGadget collapse nodes

BarryG wrote: Sun Oct 10, 2021 10:54 am mk-soft, in your code, if the user double-clicks a node name (instead of the expand/collapse button next to it), then the other open nodes don't close.
Why should the other nodes close, it is OS specific normal that the other nodes remain open. Nothing is changed here.
by mk-soft
Sun Oct 10, 2021 11:01 am
Forum: Coding Questions
Topic: TreeGadget node being detected
Replies: 12
Views: 890

Re: TreeGadget node being detected

The TreeViewGadget (WC_TREEVIEW) offers only limited functionality. A double-click event applies to the entire gadget and no distinction is made between items or nodes. ;-TOP Procedure winCB(hWnd, uMsg, WParam, LParam) Protected *NMHDR.NMHDR, Gadget Select uMsg Case #WM_NOTIFY *NMHDR = LParam Gadget...
by mk-soft
Sat Oct 09, 2021 8:24 pm
Forum: Feature Requests and Wishlists
Topic: Calling ProcedureReturn from within a loop. More information needed in docs to clarify if this is a valid thing to do.
Replies: 6
Views: 708

Re: Calling ProcedureReturn from within a loop. More information needed in docs to clarify if this is a valid thing to d

The resources of a procedure are deleted. Also with a ProcedureReturn, because it jumps to the "end". // Procedure foo() static integer f_foo() { integer r=0; integer v_i=0; void* v_s1=0; pb_list t_s2={0}; // Protected s1.s = "Hello", i SYS_FastAllocateStringFree4(&v_s1,_S1);...
by mk-soft
Sat Oct 09, 2021 3:49 pm
Forum: Coding Questions
Topic: TreeGadget node being detected
Replies: 12
Views: 890

Re: TreeGadget node being detected

Here with multi sub level ... Sorry Update 2 If OpenWindow(0, 0, 0, 355, 180, "TreeGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) TreeGadget(0, 10, 10, 160, 160) ; TreeGadget standard TreeGadget(1, 180, 10, 160, 160, #PB_Tree_CheckBoxes | #PB_Tree_NoLines); TreeGadget with Che...
by mk-soft
Sat Oct 09, 2021 11:17 am
Forum: Feature Requests and Wishlists
Topic: Return sizes on the PB help
Replies: 5
Views: 716

Re: Return sizes on the PB help

A Integer is always right for #PB_Any
by mk-soft
Fri Oct 08, 2021 6:03 pm
Forum: General Discussion
Topic: Work order for Bind-Commands
Replies: 6
Views: 614

Re: Work order for Bind-Commands

Hello STARGÅTE,

Even though your example is very nice, it bothers me a little that you put Window objects and Gadget objects in the same enumeration. Otherwise the new users will think that this is correct, even if this works.