PDA

Click to See Complete Forum and Search --> : TitleBar Height


spetnik
Apr 25th, 2001, 10:26 AM
How can I adjust the height of my titlebar?

Matthew Gates
Apr 25th, 2001, 01:56 PM
How about making your own titlebar? Take a look at this thread (http://www.vbforums.com/showthread.php?s=&threadid=52585) for an example.

Megatron
Apr 25th, 2001, 02:18 PM
You can use a PictureBox to simulate a Titlebar. Add the following code to a Form with a PictureBox.

Dim OldX As Single
Dim OldY As Single

Private Sub Form_Load()
Picture1.Align = vbAlignTop
End Sub

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
OldX = X
OldY = Y
End If
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then Move Left + (X - OldX), Top + (Y - OldY)
End Sub

spetnik
Apr 25th, 2001, 03:27 PM
If i do that, i would like to SubClass it using SetWindowLong so that windows would think that is a titlebar. Also, Ive seen apps that have pics on their titlebar. Anyone know how that is done?