adding to the title bar

n30n
03-03-2001, 05:37 PM
hey,

I was wondering, how could you add another button to the top of thtitle bar, up where, Minimise, Maximise, and close buttons were. How would i go about creating another button that was next to the close button on a form with a borderstyle of fixed ToolWindow.

Any help would be apprecieated.

- n30n

pponchot
03-05-2001, 01:06 PM
I've never been able to figure out how to do this myself. As an alternative, I've removed the title bar. I then put in a label and then use command buttons to simulate these buttons. I place these command buttons over the right side of the label.

For the X button click I put in this code: Unload me

for the Square button, I put in this code:
If Form1.WindowState = vbMaximized Then
Form1.WindowState = vbNormal
Else
If Form1.WindowState = vbNormal Then Form1.WindowState = vbMaximized
End If

for the -- button I put in this code:
form1.windowstate = vbminimized

This way you can add other buttons.

The one drawback is that you have to add code so that the user can drag or move the form around (since it has no titlebar). I have this code. Phillip

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum