Page 1 of 1
Window borderless, not draggable?
Posted: Mon Jan 08, 2018 10:48 am
by stmdbe2019
How do i remove the border? And not draggable?
Code: Select all
; no task bar
; no close, minimise, no maximise, no resise
; no draggable ?
; no border?
Style.l = #PB_Window_BorderLess|#PB_Window_ScreenCentered|#PB_Window_WindowCentered|#DS_3DLOOK
OpenWindow(#MainWindow, x, y, width, height, "", Style)
Re: Window borderless, not draggable?
Posted: Mon Jan 08, 2018 10:52 am
by Bisonte
Only
Code: Select all
#PB_Window_BorderLess|#PB_Window_ScreenCentered
This must be enough.
And if you not want to have the window at the center of the screen... only #PB_Window_BorderLess.
Re: Window borderless, not draggable?
Posted: Mon Jan 08, 2018 11:14 am
by stmdbe2019
Sorry. following code with mix of `|#DS_3DLOOK` (hide my application from windows task bar, so that no right click to close it quickly) does not work to apply BORDERLESS is it a BUG?
Re: Window borderless, not draggable?
Posted: Mon Jan 08, 2018 11:35 am
by Bisonte
Search at RSBasic's WinAPI Library for : HideWindowFromTaskBar and don't use this flag.
Its not a bug... You are using a constant that is not intended for OpenWindow().
Re: Window borderless, not draggable?
Posted: Tue Jan 09, 2018 6:46 am
by mestnyi
Code: Select all
Debug #DS_3DLOOK ; 4
Debug #PB_Window_Tool ; 4
Re: Window borderless, not draggable?
Posted: Tue Jan 09, 2018 2:26 pm
by stmdbe2019
It is impossible to remove the border and make hide from task bar. Tried following combination but failed:
Code: Select all
#PB_Window_Tool|#PB_Window_BorderLess
Re: Window borderless, not draggable?
Posted: Tue Jan 09, 2018 5:40 pm
by mestnyi
Code: Select all
If OpenWindow(0, 100, 200, 195, 260, "PureBasic Window", #PB_Window_BorderLess, WindowID(OpenWindow(#PB_Any, 0, 0, 0, 0, "", #PB_Window_Invisible)))
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
For windows
Code: Select all
If OpenWindow(0, 100, 200, 195, 260, "PureBasic Window", #PB_Window_BorderLess)
SetWindowLong_(WindowID(0), #GWL_EXSTYLE, GetWindowLong_(WindowID(0), #GWL_EXSTYLE) | #WS_EX_TOOLWINDOW)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
draggable
http://www.purebasic.fr/english/viewtop ... 13&t=57141
Re: Window borderless, not draggable?
Posted: Tue Jan 09, 2018 7:00 pm
by Bisonte
RSBasic's WinApiLibrary says :
Code: Select all
#MainWindow = 1
Procedure HideFromTaskBar(hWnd.i, Flag.l)
Protected TBL.ITaskbarList
CoInitialize_(0)
If CoCreateInstance_(?CLSID_TaskBarList, 0, 1, ?IID_ITaskBarList, @TBL) = #S_OK
TBL\HrInit()
If Flag
TBL\DeleteTab(hWnd)
Else
TBL\AddTab(hWnd)
EndIf
TBL\Release()
EndIf
CoUninitialize_()
EndProcedure
DataSection
CLSID_TaskBarList:
Data.l $56FDF344
Data.w $FD6D, $11D0
Data.b $95, $8A, $00, $60, $97, $C9, $A0, $90
IID_ITaskBarList:
Data.l $56FDF342
Data.w $FD6D, $11D0
Data.b $95, $8A, $00, $60, $97, $C9, $A0, $90
EndDataSection
; Your Window
OpenWindow(#MainWindow, 50, 50, 640, 480, "MyProgramm", #PB_Window_BorderLess)
HideFromTaskBar(WindowID(#MainWindow), #True)
Repeat : WaitWindowEvent() : ForEver