Is title bar enabled.


     Does anyone knows how to check title bar status(if enabled or disabled) using API. What I meant by enable and disable is wheather if it is visible or not.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Titlebar of what ?
homerWSAuthor Commented:
Private Sub Command1_Click()
    If Me.BorderStyle <> 0 And Me.Visible = True Then
        MsgBox "Visible"
        MsgBox "Not visible"
    End If
End Sub
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

homerWSAuthor Commented:

      I do know how to handle via BorderStyle....  but I am more interested in using API.
I think what you're trying to do is find out when someone switches focus away from your application to something else, or vice versa... no?

If that's the case, then you need a "onlostfocus" event on the main form... no?
homerWSAuthor Commented:

      No not that, I am creating a IDE (much like VB IDE), where I have a check box that can select and deselected title bar for a MDI child form.
so then you want to toggle visible, based on the current value...

toolbar.visible = not (toolbar.visible)

This will just switch the value with the opposite of the current value. In the case of the title bar, this is a property in VB which is determined by whether or not there is a title caption and control box. What kind of a window it is...tool window, etc...

So, if you wanted to use an API to test the title bar you would probably need to create your own function to do this, based on some other API functions.

This function allows you to move a titlebarless window...

      Private Declare Function SendMessage Lib "User32" _
                         Alias "SendMessageA" (ByVal hWnd As Long, _
                                               ByVal wMsg As Long, _
                                               ByVal wParam As Long, _
                                               lParam As Any) As Long

      Private Declare Sub ReleaseCapture Lib "User32" ()

      Const HTCAPTION = 2

      Private Sub Form_Load()
         Command1.Caption = "Exit"
      End Sub

      Private Sub Form_MouseMove(Button As Integer, Shift As Integer, _
                                 X As Single, Y As Single)
         Dim lngReturnValue As Long

         If Button = 1 Then
            Call ReleaseCapture
            lngReturnValue = SendMessage(Form1.hWnd, WM_NCLBUTTONDOWN, _
                                         HTCAPTION, 0&)
         End If
      End Sub

      Private Sub Command1_Click()
      End Sub

This article is something I have used before...;en-us;147815&Product=vb6 to flash the title bar.

Perhaps some help you can find in these.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.