Results 1 to 11 of 11

Thread: [RESOLVED] Adding a button to the title bar of a form?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Roodepoort, South Africa
    Posts
    484

    Resolved [RESOLVED] Adding a button to the title bar of a form?

    Is it possible to add a small button to the title bar of a form next to the Minimize, Maximize and Close buttons on the top righthand corner of the form.

    If possible, how?

    Want to add a type of help on/off button to the form.

  2. #2

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Roodepoort, South Africa
    Posts
    484

    Re: Adding a button to the title bar of a form?

    I was hoping there is a easy way to do this e.g. API call or OCX or something.

    Drawing the button on the titlebar is going to be a problem when using on different OS as the title bar is different sizes, colors etc. on different OS.

  4. #4
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Adding a button to the title bar of a form?

    What do you mean by different OS? Visual Basic can only run on a Windows OS.

    You can always make your own Titlebar but it will require subclassing. If interested post back.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Roodepoort, South Africa
    Posts
    484

    Re: Adding a button to the title bar of a form?

    XP has a square button, Vista has a rectangular button. Can't remember what Windows 7 buttons looks like but when running VB6 in XP mode on Windows 7 the buttons are a smaller square button.

  6. #6
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Adding a button to the title bar of a form?

    Wouldn't you think though that if you put a button on the titlebar it wouldn't matter how it appears on the different versions of Windows. It's the same as putting a button on the Form; it's going to take on different appearances anyway so why worry about how it will appear on the titlebar. If you make your own titlebar and buttons it will be a fixed appearance and that might not be what users of other versions expect or want.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Roodepoort, South Africa
    Posts
    484

    Re: Adding a button to the title bar of a form?

    Not 100% sure but I think the title bars differs in size (height) as well.

    Not serious though. Currently using a button on the forms itself to turn the tooltips help on and off. Just thought if it can go up there it'll be nice.

  8. #8
    Member aarslan1's Avatar
    Join Date
    Dec 2010
    Location
    Canada
    Posts
    46

    Cool Re: Adding a button to the title bar of a form?

    Yes, the concern of look-and-feel in different windows operating systems is correct. The better (and less complex) solution will be to skin your form (i.e remove default windows skin and apply customized one).
    Thinking And Saying Java is great because it works on All operating Systems is same as saying Anal is good because it works on all genders - By Arslan

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Roodepoort, South Africa
    Posts
    484

    Re: Adding a button to the title bar of a form?

    "skin your form"

    What does that mean?

  10. #10
    Member aarslan1's Avatar
    Join Date
    Dec 2010
    Location
    Canada
    Posts
    46

    Wink Re: Adding a button to the title bar of a form?

    Have A Look Here! For A Good Example of form skinning.

    By Form Skinning I implied, add either custom GUI controls, thus allowing yourself to do whatsoever you want to, with user interface.
    Thinking And Saying Java is great because it works on All operating Systems is same as saying Anal is good because it works on all genders - By Arslan

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Roodepoort, South Africa
    Posts
    484

    Re: Adding a button to the title bar of a form?

    Decided to stick to the button on the form itself. Thanks for the suggestions.

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