• Welcome to Valhalla Legends Archive.
 

Need help with top border

Started by ChR0NiC, December 31, 2003, 01:15 AM

Previous topic - Next topic

ChR0NiC

I want my top border to look like this, and I have no idea how...
Also I want to be able to move it around......like drag it around..

Spht

Quote from: ChR0NiC on December 31, 2003, 01:15 AM
I want my top border to look like this, and I have no idea how...
Also I want to be able to move it around......like drag it around..
cat

The easiest way (and probably onliest) would be to set your form's BorderStyle to None (0), then make your own title bar using labels and images. For dragging the form, you can put a transparent label over your fake title bar and on the label's MouseDown event, call this function (I wrote this recently for a project which had no title bar):

Public Sub MoveForm(ByVal frmForm As Form, ByVal Button As Integer)
   If Button = vbLeftButton Then
       ReleaseCapture
       SendMessage frmForm.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0
   End If
End Sub


You can find the API declarations and constants in API text viewer or search Google.com.

hismajesty

You could use the "ActiveSkin 4.0 Type Library" component.