Windows that don't show up on the tack bar

Just starting out? Need help? Post your questions and find answers here.
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Windows that don't show up on the tack bar

Post by Tipperton »

Is it possible using OpenWindow to create a window that doesn't have a button on the task bar?

Thanks!
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Use a hidden-window + your window :wink:

Code: Select all

If OpenWindow(0, 0, 0, 0, 0, "", #PB_Window_Invisible)
  OpenWindow(1, #PB_Ignore, 0, 640, 480, "Test2", #PB_Window_SystemMenu, WindowID(0))
  Repeat
  Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
The Main-Window is invisible, so not in the taskbar, the parent isn't in the taskbar

Here with changing:

Code: Select all

If OpenWindow(0, 0, 0, 0, 0, "Test1", #PB_Window_Invisible|#PB_Window_BorderLess)
  If OpenWindow(1, #PB_Ignore, 0, 640, 480, "Test2", #PB_Window_SystemMenu, WindowID(0))
    If CreateGadgetList(WindowID(1))
      ButtonGadget(0, 10, 10, 80, 25, "Hide On/Off", #PB_Button_Toggle) 
    EndIf
  EndIf
  Flag = 1
  Repeat
    Event = WaitWindowEvent()
    If Event = #PB_Event_Gadget
      If EventGadget() = 0
        Flag ! 1
        HideWindow(0, Flag)
      EndIf
    EndIf
  Until Event = #PB_Event_CloseWindow
EndIf
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Post by Tipperton »

Thanks I'll have to try that.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Windows that don't show up on the tack bar

Post by PB »

> Is it possible using OpenWindow to create a window that doesn't have a button on the task bar?

viewtopic.php?t=4865
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Post by Tipperton »

ts-soft;

Thanks! That worked beautifuly and was very easy to do... :D
acidburn
User
User
Posts: 23
Joined: Mon Aug 07, 2006 1:37 pm

Post by acidburn »

Yey! TY for the code
Post Reply