Search found 7689 matches

by netmaestro
Fri Sep 24, 2021 5:00 pm
Forum: Coding Questions
Topic: Button color mouseover issue
Replies: 15
Views: 585

Re: Button color mouseover issue

Thanks for asking! Moving a bit slower these days but I can still beat any c++ coder in an arm wrestle :D
by netmaestro
Fri Sep 24, 2021 4:30 pm
Forum: Coding Questions
Topic: Button color mouseover issue
Replies: 15
Views: 585

Re: Button color mouseover issue

Just send all the buttons to the same callback and use the hWnd parameter within the callback to choose whether or not to do the coloring. Or RASHAD's solution is a good one too.
by netmaestro
Tue Sep 21, 2021 4:37 pm
Forum: Coding Questions
Topic: Call Function from outside of a module
Replies: 3
Views: 355

Re: Call Function from outside of a module

The way you have it set up now seems correct. If workarounds were possible for crossing the module/caller boundary the result would be convoluted logic and you'd lose the purpose of using modules. I currently have an own errorhandler, which I want to get rid of, within the module. My advice would be...
by netmaestro
Thu Sep 16, 2021 8:59 pm
Forum: Bugs - Windows
Topic: AESEncoder crashes with files bigger than 2gb
Replies: 3
Views: 770

Re: AESEncoder crashes with files bigger than 2gb

You'd want to stream anything that size anyway. I don't see an issue here.
by netmaestro
Mon Sep 13, 2021 9:01 pm
Forum: Coding Questions
Topic: ListIconGadget event for scrollbar change?
Replies: 8
Views: 522

Re: ListIconGadget event for scrollbar change?

EnableExplicit Define I.i, WindowEvent.i, Listicon.i Procedure Report(hWnd) Protected I.i, FirstVisibleLine.i, VisibleLinesCount.i, FirstVisibleLineBefore.i = -1 FirstVisibleLine = SendMessage_(hWnd, #LVM_GETTOPINDEX, 0, 0) VisibleLinesCount = SendMessage_(hWnd, #LVM_GETCOUNTPERPAGE, 0, 0) - 1 If (...
by netmaestro
Wed Sep 08, 2021 5:36 pm
Forum: Coding Questions
Topic: ButtonImageGadget in front of image
Replies: 10
Views: 1119

Re: ButtonImageGadget in front of image

Declare ButtonProc() Declare CreateBackground() OpenWindow(0,0,0,320,240,"",#PB_Window_ScreenCentered|#PB_Window_SystemMenu) ContainerGadget(0,32,50,256,128) SetClassLongPtr_(GadgetID(0), #GCL_HBRBACKGROUND, CreateBackground()) CreateImage(1, 80, 20, 24, #Red) ButtonImageGadget(1, 88, 54,...
by netmaestro
Sun Aug 29, 2021 1:49 am
Forum: Coding Questions
Topic: Reading POINTs from an image, to draw on another.
Replies: 16
Views: 1912

Re: Reading POINTs from an image, to draw on another.

For one thing, your StartDrawing() should be done before your For loops to avoid doing it for every pixel. Btw, have you considered GrabImage()?
by netmaestro
Fri Aug 13, 2021 5:57 pm
Forum: Coding Questions
Topic: For Next STEP As Variable?
Replies: 13
Views: 1762

Re: For Next STEP As Variable?

Fred or Freak might answer but I wouldn't look for it as it's a topic that's been discussed to death over the last 20 years and they've never indicated that they'd consider a change here.
by netmaestro
Thu Jul 29, 2021 5:52 pm
Forum: Coding Questions
Topic: Braking in ListIconGadget
Replies: 5
Views: 1029

Re: Braking in ListIconGadget

WM_VSCROLL won't show up in a PB event loop. To use it, subclass the parent of the scrollbar and convert the message to a custom event which you can then handle within your event loop. Small example: #MSG_VSCROLL = #PB_Event_FirstCustomValue Procedure ScrollAreaProc(hWnd, Msg, wParam, lParam) oldpro...
by netmaestro
Fri Jul 09, 2021 11:22 pm
Forum: Announcement
Topic: PureBasic 6.00 Alpha 5 released !
Replies: 199
Views: 42844

Re: PureBasic 6.00 Alpha 3 released !

Why didn't they call Alpha 2 "Alfalfa" ?
by netmaestro
Wed Jun 23, 2021 10:11 pm
Forum: Announcement
Topic: PureBasic 6.00 Alpha 5 released !
Replies: 199
Views: 42844

Re: PureBasic 6.00 Alpha 2 released !

That should be fine.
by netmaestro
Tue Jun 22, 2021 12:14 am
Forum: Coding Questions
Topic: Setting images as mouse cursor?
Replies: 6
Views: 936

Re: Setting images as mouse cursor?

Back in 2005 when I was just starting out I asked this question. A senior user named Sparkie answered it for me then and his answer still works well today. It's here: viewtopic.php?f=13&t=18859
by netmaestro
Sat May 29, 2021 9:21 pm
Forum: Coding Questions
Topic: OnMouse Over Container
Replies: 8
Views: 728

Re: OnMouse Over Container

If you're going to place gadgets in the canvas that require input or that must respond to clicks there is a bit more you need to do. The gadget must be subclassed to pass on messages to the canvas as the canvas won't get mouse messages while the user is hovering over its contained gadget. This is no...
by netmaestro
Fri May 28, 2021 5:39 pm
Forum: Coding Questions
Topic: OnMouse Over Container
Replies: 8
Views: 728

Re: OnMouse Over Container

#PB_Canvas_Container will let you use a canvas for your container, giving you the full spectrum of events including all the mouse ones. You can use individual canvas containers for your items and they'll all report mouse events, identifiable with PB_Event_Gadget().