-1

I want to add two more Buttons besides (Close - minimize - Maximize) to the form's title bar in vb6 that can be customized (ex: change their Icons). If anyone knows how please help.

BobRodes
  • 5,990
  • 2
  • 24
  • 26
  • For what you need, you might be better off hiding the window titlebar and providing your own titlebar(label+buttons) on your form with whatever buttons you need. Be aware though that the look and feel may not change automatically when winfows theme is changed or viewing on a different version of windows. – Pradeep Kumar Aug 03 '15 at 01:06

2 Answers2

0

I tried to do that in a project. I disabled the default buttons and then I used picture boxes with some images in it. After that I created "events" for every picture . You can add the "pushed button" effect by changing the image with a darker one. (Sorry for mistakes-this is not my original language)

  • thanks Emil for your answer but i want to know details my friend i want to know exactly how to implement that the way that i spent a lot time to search and found is to draw button on the title bar with API using but in this way the button can not be customized so if you wrote a code about that and create buttons in the title bar please explain more clearly and put your code in here thank you . – EhsanBayat Aug 01 '15 at 12:08
  • I don't think you'll like my code because is primitive. But I'll edit my answer and I will include the code... – Emil Reznicencu Aug 01 '15 at 13:15
0

While it is (probably) possible to do this using EnumChildWindows, SendMessage and the like, I wouldn't recommend it personally, because it runs contrary to best practice. Why would you ask the users of your application to work with an unfamiliar window layout?

The better way to do this is to use a Toolbar, since that's the accepted practice. Googling how to use the Toolbar will give you plenty of help.

BobRodes
  • 5,990
  • 2
  • 24
  • 26