CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 1999
    Posts
    19

    How can I add button at titlebar ?

    Hello
    How i add my personal button at titlebar.
    Especially I want put it beside minimizebox.
    Now I can us visual basic and visual c++.
    I prefer to use visual basic.
    Good bye.


  2. #2
    Join Date
    Jul 1999
    Location
    Athens, Hellas
    Posts
    769

    Re: How can I add button at titlebar ?

    I would suggest to create your own title bar:
    set controlbox property to false and the set the caption to be empty (null string).
    Then create an image (maybe with Photoshop) and add an image on your form and set its picture property to this bitmap. You can add over this image any button you want and also any label or icon you want. I have created great title bars such way!!! Good creation!!!

    Michael Vlastos
    Company MODUS SA
    Development Department
    Athens, Greece
    Tel: +3-01-9414900

  3. #3
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: How can I add button at titlebar ?

    Matt Hart (http://www.matthart.com) wrote an article on this in the March edition of the Visual Basic Programmers Journal. I couldn't find the code for this on his site, but you should be able to get it from the VBPJ site at http://www.vbpj.com


    Chris Eastwood

    CodeGuru - the website for developers
    http://www.codeguru.com/vb

  4. #4
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: How can I add button at titlebar ?

    Hi,

    Dr_Micheal's reply is a nice trick, by the way. It is the way people use to do till the days of VB 5, i guess. For all practical purposes it would work, Unless ofcourse you want to keep changing your Forms caption on the run.. :-)

    With Vb 5, it allows you to subclass. SO you can subclass the form. I think you have to add extra buttons, for the system/control box. You get a WM_SYSCommand when something happens there and you need to process it. That is a broad picture, under which you need to work. Indicentally , on similar lines goes the shading the title-bar technique.

    RK

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