Results 1 to 3 of 3

Thread: [RESOLVED] MDI Title/Caption bar question

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Apr 2005
    Location
    Debug.Print
    Posts
    3,885

    Resolved [RESOLVED] MDI Title/Caption bar question

    I know with a regular form, you can remove the title bar (the blue bar at the top of the form). However, my questions is, can you do the same with an MDI form? The reason I ask is because once my app is completely functional, I am going to be working on the visual design of the forms in the app. Uniformity is very important I believe. Have searched the net and vbf without success. Please advise if you can. Thanks in advance.









    Added green "resolved" checkmark - Hack

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: MDI Title/Caption bar question

    Found this in the VB Groups on Google in 3 seconds...

    VB Code:
    1. Private Declare Function GetWindowLong Lib "user32" _
    2.                 Alias "GetWindowLongA" _
    3.                (ByVal hwnd As Long, _
    4.                 ByVal nIndex As Long) As Long
    5.  
    6.  
    7. Private Declare Function SetWindowLong Lib "user32" _
    8.                 Alias "SetWindowLongA" _
    9.                (ByVal hwnd As Long, _
    10.                 ByVal nIndex As Long, _
    11.                 ByVal dwNewLong As Long) As Long
    12.  
    13.  
    14. Private Const GWL_STYLE = -16&
    15. Private Const WS_CAPTION = &HC00000
    16.  
    17.  
    18. Private Sub MDIForm_Load()
    19.    Dim lStyle As Long
    20.    lStyle = GetWindowLong(Me.hwnd, GWL_STYLE)
    21.    lStyle = lStyle And (Not WS_CAPTION)
    22.    SetWindowLong Me.hwnd, GWL_STYLE, lStyle
    23.    Me.Show
    24. End Sub

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Apr 2005
    Location
    Debug.Print
    Posts
    3,885

    Re: MDI Title/Caption bar question

    thanks for the code. problem with me is, if i search for black, i get white. lol.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width