I need to remove window title bar on run-time as shown below:
Normal mode:

After removing:

How can I do this?
Thanks.
Code: Select all
If OpenWindow(0, 0, 0, 222, 200, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_MaximizeGadget | #PB_Window_MinimizeGadget)
hWnd = WindowID(0)
ButtonGadget(0, 10, 10, 200, 20, "Click")
Repeat
eventID = WaitWindowEvent()
If eventID = #PB_Event_Gadget
SetWindowLong_(hWnd, #GWL_STYLE, GetWindowLong_(hWnd, #GWL_STYLE)&~#WS_CAPTION&~#WS_SIZEBOX)
SetWindowPos_(hWnd, 0, 0, 0, 0, 0, #SWP_NOMOVE|#SWP_NOSIZE|#SWP_NOZORDER|#SWP_FRAMECHANGED|#SWP_DRAWFRAME)
EndIf
Until eventID = #PB_Event_CloseWindow
EndIf
Code: Select all
i=OpenWindow(0,0,0,100,100,"*",#PB_Window_ScreenCentered)
;imagegadget...
Delay(1000)
SetWindowLong_(i,#GWL_STYLE,GetWindowLong_(i,#GWL_STYLE)&~#WS_CAPTION)
Repeat
Until WindowEvent()=#WM_CHAR
Triggers a virus / trojan warning here. False perhaps, but nevertheless.
Code: Select all
If OpenWindow(0, 0, 0, 222, 200, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_MaximizeGadget | #PB_Window_MinimizeGadget)
hWnd = WindowID(0)
ButtonGadget(0, 10, 10, 200, 20, "Click")
borderless = 0
Repeat
eventID = WaitWindowEvent()
If eventID = #PB_Event_Gadget
If Not borderless
SetWindowLong_(hWnd, #GWL_STYLE, GetWindowLong_(hWnd, #GWL_STYLE)&~#WS_CAPTION&~#WS_SIZEBOX)
SetWindowPos_(hWnd, 0, 0, 0, 0, 0, #SWP_NOMOVE|#SWP_NOSIZE|#SWP_NOZORDER|#SWP_FRAMECHANGED|#SWP_DRAWFRAME)
Else
SetWindowLong_(hWnd, #GWL_STYLE, GetWindowLong_(hWnd, #GWL_STYLE)|#WS_CAPTION|#WS_SIZEBOX)
SetWindowPos_(hWnd, 0, 0, 0, 0, 0, #SWP_NOMOVE|#SWP_NOSIZE|#SWP_NOZORDER|#SWP_FRAMECHANGED|#SWP_DRAWFRAME)
EndIf
borderless = 1-borderless
EndIf
Until eventID = #PB_Event_CloseWindow
EndIf