Got an idea for enhancing SpiderBasic? New command(s) you'd like to see?
BinoX
 
Posts: 7
Joined: Mon Aug 01, 2016 4:13 pm

Desktop events

by BinoX Mon Aug 01, 2016 4:16 pm

I was hoping that there would be a way of capturing desktop events (so that, for example, anything that needs to be the width/height of the "desktop" can be resized without having to check it with a timer (i.e. a full width menubar on the desktop or a full height widget bar))
Fred
Site Admin
 
Posts: 1134
Joined: Mon Feb 24, 2014 10:51 am

Re: Desktop events

by Fred Wed Aug 03, 2016 6:56 am

You can use a window with the #PB_Window_Background flag and bind event on its resize, it should do the job.
juror
 
Posts: 9
Joined: Fri Aug 01, 2014 4:39 am

Re: Desktop events

by juror Thu Jun 27, 2019 7:28 pm

Fred wrote:You can use a window with the #PB_Window_Background flag and bind event on its resize, it should do the job.


How do you know when it is resized? Is there an event?
User avatar
Peter
 
Posts: 596
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1

Re: Desktop events

by Peter Thu Jun 27, 2019 7:34 pm

Code: Select all
Procedure SizeWindowEvent()
  Debug "SizeWindowEvent"
EndProcedure

Procedure SizeDesktopEvent()
  Debug "SizeDesktopEvent"
EndProcedure

OpenWindow(0, 0, 0, 0, 0, "", #PB_Window_Background)

BindEvent(#PB_Event_SizeWindow, @SizeWindowEvent(), 0)
BindEvent(#PB_Event_SizeDesktop, @SizeDesktopEvent(), 0)


(in this example PB_Event_SizeWindow seems to be the same as PB_Event_SizeDesktop)

Greetings ... Peter
juror
 
Posts: 9
Joined: Fri Aug 01, 2014 4:39 am

Re: Desktop events

by juror Thu Jun 27, 2019 8:00 pm

Thanks Peter, once again you come through :)
Return to Feature Requests and Wishlists

Who is online

Users browsing this forum: No registered users and 4 guests