|
-
Aug 12th, 2000, 01:54 AM
#1
Thread Starter
New Member
Toolbar?....
Well I want my programs to have their own toolbars...meaning, my own...
Still dont know what Im getting at?
Well the blue bar ontop of every program....i dont want that....i would like to make my own
how would i go by doing that?
_-=Motex=-_
-
Aug 12th, 2000, 05:52 AM
#2
Uhh. what do you mean? Toolbar or Titlebar or both?
-
Aug 12th, 2000, 08:15 AM
#3
Monday Morning Lunatic
Set the form's caption to "" and the ControlBox property to False. Then, you can use your own titlebar.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 12th, 2000, 05:23 PM
#4
Code:
Public Declare Function ReleaseCapture Lib "user32" () As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Sub FormDrag(frm As Form)
ReleaseCapture
Call SendMessage(frm.hwnd, 161, 2, 0&)
End Sub
when you want to use put
put it in the MouseDown Event of almost anything(label, cmd button, form, etc)
that lets you drag a form without a title bar
-
Aug 12th, 2000, 05:29 PM
#5
Monday Morning Lunatic
Yep. Just before you posted I'd put that into my small example project. It now resizes properly, and handles the control buttons. It doesn't popup the system menu yet, but if anyone knows how, it'll be very welcome.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 12th, 2000, 05:54 PM
#6
Monday Morning Lunatic
Here's a very rough example, which demonstrates right alignment of the title, since it's the same example I'm using for another thread:
http://www.parksie.uklinux.net/newtitle.zip
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 13th, 2000, 12:35 PM
#7
A little different from the code Dennis gave, not using api:
Code:
'Label1 is your titlebar
Dim oldX As Long, oldY As Long, isMoving As Boolean
Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
oldX = X
oldY = Y
isMoving = True
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If isMoving Then
Me.Top = Me.Top - (oldY - Y)
Me.Left = Me.Left - (oldX - X)
End If
End Sub
Private Sub Label1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
isMoving = False
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
|