Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Is title bar enabled.

Posted on 2003-11-13
7
Medium Priority
?
266 Views
Last Modified: 2010-05-01
Halo,

     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.
0
Comment
Question by:homerWS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 14

Expert Comment

by:aelatik
ID: 9740214
Titlebar of what ?
0
 

Author Comment

by:homerWS
ID: 9740236
form!
0
 
LVL 14

Expert Comment

by:aelatik
ID: 9740536
Private Sub Command1_Click()
    If Me.BorderStyle <> 0 And Me.Visible = True Then
        MsgBox "Visible"
    Else
        MsgBox "Not visible"
    End If
End Sub
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:homerWS
ID: 9740664
aelatik,

      I do know how to handle via BorderStyle....  but I am more interested in using API.
0
 
LVL 1

Expert Comment

by:InTheWind
ID: 9740862
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?
0
 

Author Comment

by:homerWS
ID: 9742078
InTheWind,

      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.
0
 
LVL 1

Accepted Solution

by:
InTheWind earned 60 total points
ID: 9742272
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 WM_NCLBUTTONDOWN = &HA1
      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
      End Sub

This article is something I have used before...  http://support.microsoft.com/default.aspx?scid=kb;en-us;147815&Product=vb6 to flash the title bar.

Perhaps some help you can find in these.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question