Can not trigger resizing a disabled window

Just starting out? Need help? Post your questions and find answers here.
Martin Verlaan
Enthusiast
Enthusiast
Posts: 135
Joined: Sun Apr 01, 2018 11:26 am
Location: Netherlands
Contact:

Can not trigger resizing a disabled window

Post by Martin Verlaan »

Is there a way to trigger #PB_Event_SizeWindow with a disabled window?

Code: Select all

OpenWindow(0, 0, 0, 150, 50, "Window", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_ScreenCentered)
DisableWindow(0, #True)

Repeat
  Event = WaitWindowEvent()
  
  Select Event
    Case #PB_Event_SizeWindow
      Debug "Resize triggered" ; does not work with disabled window
  EndSelect
Until Event = #PB_Event_CloseWindow
User avatar
jacdelad
Addict
Addict
Posts: 2032
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: Can not trigger resizing a disabled window

Post by jacdelad »

Does a disabled window receive any message at all?
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Martin Verlaan
Enthusiast
Enthusiast
Posts: 135
Joined: Sun Apr 01, 2018 11:26 am
Location: Netherlands
Contact:

Re: Can not trigger resizing a disabled window

Post by Martin Verlaan »

That's a good point. :oops: Solved the problem with a timer.
BarryG
Addict
Addict
Posts: 4219
Joined: Thu Apr 18, 2019 8:17 am

Re: Can not trigger resizing a disabled window

Post by BarryG »

Martin Verlaan wrote: Mon Apr 01, 2024 5:28 pmIs there a way to trigger #PB_Event_SizeWindow with a disabled window?
I know you solved it, but for any newbies reading: just use the ResizeWindow() command.
Post Reply