|
-
Feb 8th, 2001, 01:41 PM
#1
Thread Starter
Member
Hi there,
i'd like to change the color of the titlebar of my application.
Can someone tell me if there is some API function to do this?
(i want to change the titlebar only of mine application. so changing the system settings isn't a good idea)
Susn
-
Feb 8th, 2001, 02:42 PM
#2
Make your own custom title bar.
Take a look at this thread for an example.
-
Feb 8th, 2001, 03:12 PM
#3
Add to a Form with a PictureBox,
Code:
Private OldX As Single
Private OldY As Single
Private Sub Form_Load()
Picture1.Align = 1
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
you can use this Picturebox as a titlebar and use the PictureBox as your titlebar.
-
Feb 8th, 2001, 03:38 PM
#4
Here's an API method.
Code:
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
ReleaseCapture
SendMessage hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|