Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: ChR0NiC on December 31, 2003, 01:15 AM

Title: Need help with top border
Post by: 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..
(http://www.megasecurity.org/trojans/o/optix/ImagesP/Optixpro1.32_es.gif)
Title: Re:Need help with top border
Post by: Spht on December 31, 2003, 01:26 AM
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.
Title: Re:Need help with top border
Post by: hismajesty on December 31, 2003, 05:20 AM
You could use the "ActiveSkin 4.0 Type Library" component.