CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2000
    Location
    NY, USA
    Posts
    632

    Title Bar visibility

    I set ControlBox = False on all my Children forms at design time. When any of Child form is loaded into MDI, its Title Bar appears for 0.3-0.5 sec making the application look not clear enough.
    I found this code via Google:

    Declare Function FindWindow& Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String)
    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

    Public Sub HideTaskBar()
    Dim taskWindow As IntPtr = FindWindow("HHTaskBar", Nothing)
    If Not taskWindow = IntPtr.Zero Then

    'SWP_NOZORDER = &H4
    SetWindowPos(taskWindow, IntPtr.Zero, 0, 0, 0, 0, &H4)
    End If

    End Sub

    But it produces an error on the first line in HideTaskBar Sub.

    I'm looking for help either with this Sub or with complete hiding the title bar by any other way.

    Thank you
    Vlad

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Title Bar visibility

    What do you want to hide the Title bar, or the Taskbar - because they are 2 seperate things ¿

  3. #3
    Join Date
    Aug 2000
    Location
    NY, USA
    Posts
    632

    Re: Title Bar visibility

    I want to hide Title bar. But I found discussion on internet about exact my problem and one guy gave there the code saying that he solved the problem with TITLE BAR visibility with that code.

    Thank you

  4. #4
    Join Date
    Feb 2005
    Location
    Israel
    Posts
    1,475

    Re: Title Bar visibility

    Form has FormBorderStyle property. Set it to "None". This will make the TitleBar disappear.

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

Featured