Valhalla Legends Forums Archive | Visual Basic Programming | Need help with top border

AuthorMessageTime
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..
[img]http://www.megasecurity.org/trojans/o/optix/ImagesP/Optixpro1.32_es.gif[/img]
December 31, 2003, 7:15 AM
Spht
[quote author=ChR0NiC link=board=31;threadid=4524;start=0#msg37716 date=1072854918]
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
[/quote]

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):

[code]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[/code]

You can find the API declarations and constants in API text viewer or search Google.com.
December 31, 2003, 7:26 AM
hismajesty
You could use the "ActiveSkin 4.0 Type Library" component.
December 31, 2003, 11:20 AM

Search