Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hide Titlebar

386 views
Skip to first unread message

ekologi

unread,
Sep 21, 2007, 2:29:40 AM9/21/07
to
Hi all,
Is it posible to hide a title bar on MAIN windows type? If can, how to do
it?
I'm using PB9.

Thx


Jamal Ahmad

unread,
Sep 21, 2007, 3:00:52 AM9/21/07
to
For DataWindow controls, the TitleBar property can be modified in a script.
It cannot be modified for Windows.

From IDE you can only change this property for window type Child, Popup and
response.


"ekologi" <eba...@gmail.com> wrote in message news:46f364d4@forums-1-dub...

Message has been deleted

ekologi

unread,
Sep 21, 2007, 8:31:01 PM9/21/07
to
Would you be kind to give me the link? I cannot find any articles that
contain removing caption bar using powerbuilder,
TIA
"Philip Salgannik" <philema...@comcast.net> wrote in message
news:46f3c3ac$1@forums-1-dub...
> That's not correct. You can remove the caption bar with an API call.
> Search google, I posted an example....
>
> "Jamal Ahmad" <jamal...@logicacmg.com> wrote in message
> news:46f36c24$1@forums-1-dub...

ja...@pcinfonet.com

unread,
Sep 22, 2007, 12:19:01 PM9/22/07
to
external function:
Function ulong SetWindowPos(ulong hwnd,ulong hWndInsertAfter,ulong
wx,ulong wy,ulong cx,ulong cy,ulong wFlags) LIBRARY "user32.dll"
Function ULong SetWindowLongW(Long hwnd, Long nIndex, Long dwNewLong)
Library 'user32.dll'
Function ULong GetWindowLongW(Long hwnd, Long nIndex) Library
'user32.dll'

code:
long dwStyle
dwStyle = GetWindowLongW(handle(w_main), -16)
dwStyle = dwStyle + 12582912
dwStyle = SetWindowLongW(handle(w_main), , -16, dwStyle)
SetWindowPos(handle(w_main), , -2, 0, 0, 0, 0, 39)

ekologi

unread,
Sep 23, 2007, 12:47:33 PM9/23/07
to
I've got the scrip for VB and it works find on VB but don't know how to
convert it to PB. Need help....
//VB6
Private Declare Function SetWindowLong Lib "user32" _
Alias "SetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As
Long
Private Declare Function GetWindowLong Lib "user32" _
Alias "GetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Const GWL_STYLE = (-16)
Private Const WS_CAPTION = &HC00000 ' WS_BORDER Or WS_DLGFRAME
Private Const WS_MAXIMIZEBOX = &H10000
Private Const WS_MINIMIZEBOX = &H20000
Private Const WS_SYSMENU = &H80000

Private Declare Function SetWindowPos Lib "user32" _
(ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
ByVal x As Long, ByVal y As Long, _
ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Enum ESetWindowPosStyles
SWP_SHOWWINDOW = &H40
SWP_HIDEWINDOW = &H80
SWP_FRAMECHANGED = &H20 ' The frame changed: send WM_NCCALCSIZE
SWP_NOACTIVATE = &H10
SWP_NOCOPYBITS = &H100
SWP_NOMOVE = &H2
SWP_NOOWNERZORDER = &H200 ' Don't do owner Z ordering
SWP_NOREDRAW = &H8
SWP_NOREPOSITION = SWP_NOOWNERZORDER
SWP_NOSIZE = &H1
SWP_NOZORDER = &H4
SWP_DRAWFRAME = SWP_FRAMECHANGED
HWND_NOTOPMOST = -2
End Enum

Private Declare Function GetWindowRect Lib "user32" ( _
ByVal hwnd As Long, lpRect As RECT) As Long
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Private Function ShowTitleBar(ByVal bState As Boolean)
Dim lStyle As Long
Dim tR As RECT

' Get the window's position:
GetWindowRect Me.hwnd, tR

' Modify whether title bar will be visible:
lStyle = GetWindowLong(Me.hwnd, GWL_STYLE)
If (bState) Then
Me.Caption = Me.Tag
If Me.ControlBox Then
lStyle = lStyle Or WS_SYSMENU
End If
If Me.MaxButton Then
lStyle = lStyle Or WS_MAXIMIZEBOX
End If
If Me.MinButton Then
lStyle = lStyle Or WS_MINIMIZEBOX
End If
If Me.Caption <> "" Then
lStyle = lStyle Or WS_CAPTION
End If
Else
Me.Tag = Me.Caption
Me.Caption = ""
lStyle = lStyle And Not WS_SYSMENU
lStyle = lStyle And Not WS_MAXIMIZEBOX
lStyle = lStyle And Not WS_MINIMIZEBOX
lStyle = lStyle And Not WS_CAPTION
End If
SetWindowLong Me.hwnd, GWL_STYLE, lStyle

' Ensure the style takes and make the window the
' same size, regardless that the title bar etc
' is now a different size:
SetWindowPos Me.hwnd, _
0, tR.Left, tR.Top, _
tR.Right - tR.Left, tR.Bottom - tR.Top, _
SWP_NOREPOSITION Or SWP_NOZORDER Or SWP_FRAMECHANGED

Me.Refresh

' Ensure that your resize code is fired, as the client area
' has changed:
'Form_Resize

End Function

"ekologi" <eba...@gmail.com> wrote in message news:46f46245@forums-1-dub...

ekologi

unread,
Sep 26, 2007, 5:06:13 AM9/26/07
to
Thank you very much

"Philip Salgannik" <philema...@comcast.net> wrote in message
news:46f6af63@forums-1-dub...
> Import attached

>
> "ekologi" <eba...@gmail.com> wrote in message
> news:46f46245@forums-1-dub...
0 new messages