Page 1 of 1
Hide Program on Task Bar
Posted: Fri Aug 15, 2003 6:10 am
by LJ
A command like: HideProgramFromTaskbar.
Or maybe that's too long. Maybe another flag on the HideWindow command, number 2. This would prevent the program that is running from being displayed on the task bar.
Posted: Fri Aug 15, 2003 7:26 am
by CS2001
You can try this, until this Feature is added:
Code: Select all
OpenWindow(0,0,0,50,50,#PB_Window_ScreenCentered,"Not needed")
HideWindow(0, 1)
OpenWindow(1,0,0,400,100,#PB_Window_ScreenCentered|#PB_Window_SystemMenu, "Not shown in the Taskbar",WindowID(0))
Repeat
EventID=WaitWindowEvent()
Until EventID=#PB_Event_CloseWindow
CS2001
edit: Oh, haven't read the post in the Beginners Section. Perhaps you could use a Please Wait window.
Posted: Fri Aug 15, 2003 8:48 am
by CS2001
Now i have it. Try this:
Code: Select all
;Autor: Christian Stransky (CS2001)
;Datum: 15.8.03
Procedure HideWindowFromShowingInTaskbar(WindowID, NewWindowHandle, show)
If show=1
HideWindow(WindowID,1)
EndIf
SetWindowLong_(WindowID(WindowID),#GWL_HWNDPARENT,NewWindowHandle)
If show=1
HideWindow(WindowID,0)
EndIf
ProcedureReturn
EndProcedure
OpenWindow(1, 0, 0, 0, 0, #PB_Window_ScreenCentered, "Not Needed")
HideWindow(1,1)
OpenWindow(0,0,0,400,100,#PB_Window_ScreenCentered|#PB_Window_SystemMenu, "Not shown in the Taskbar")
CreateGadgetList(WindowID())
ButtonGadget(0, 0, 0, 200, 100, "Hide Window from showing in Taskbar")
ButtonGadget(1, 200, 0, 200, 100, "Show Window in Taskbar")
DisableGadget(1,1)
Repeat
EventID=WaitWindowEvent()
Select EventID
Case #PB_Event_Gadget
Select EventGadgetID()
Case 0
HideWindowFromShowingInTaskbar(0, WindowID(1), 0)
DisableGadget(0,1)
DisableGadget(1,0)
Case 1
HideWindowFromShowingInTaskbar(0, 0, 1)
DisableGadget(0,0)
DisableGadget(1,1)
EndSelect
EndSelect
Until EventID=#PB_Event_CloseWindow
I hope it helps. I've tested it under WindowsXP. I hope it works on other Sytems too.
CS2001
Nice
Posted: Sun Aug 17, 2003 11:40 pm
by LJ
@CS2001,
Greetings and nice coding. It works great, thank you.