|
-
May 12th, 2001, 12:58 PM
#1
Thread Starter
Fanatic Member
-
May 12th, 2001, 05:23 PM
#2
This is because they don't use the system default window moment (via the Caption bar), instead they reposition the form themselves, i.e.
In a Form: (set the Caption to Nothing and ControlBox to False, then add a picturebox to the form to use as your manual Caption bar.)
Code:
Option Explicit
Private lInitX As Single, lInitY As Single
Private Sub Form_Resize()
picCaptionBar.Move 0, 0, ScaleWidth
End Sub
Private Sub picCaptionBar_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
lInitX = X 'Store the Offset Coords
lInitY = Y
End If
End Sub
Private Sub picCaptionBar_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
'Reposition the Form using the Offset Values from the Current Coords
Move Left + (X - lInitX), Top + (Y - lInitY)
End If
End Sub
-
May 13th, 2001, 03:00 AM
#3
Thread Starter
Fanatic Member
Perhaps I encouraged misunderstandings.
Sorry since I clearly took too many liberties in my explanation, Aaron; I will write my letter with a more logical approach:
I have a skinned form.
I use the APIs:
Code:
Call SendMessage(frmMain.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
Call ReleaseCapture
To move the form about since it doesn't have a title bar.
HOWEVER, Windows (ME) still thinks it should give my form one of those dotted-outlined-rectangles which are a result of not checking the 'Show Window Contents When Dragging' box in Control Panel.
WinAmp, however, moves as if the aforementioned checkbox HAD been clicked.
How do I do that?
-
May 13th, 2001, 12:12 PM
#4
Well, if you don't use the API's and use my example, you can achieve what you want, most likely WinAmp does something very similar.
-
May 14th, 2001, 01:17 PM
#5
Thread Starter
Fanatic Member
Oooooooooooh.
No need to take that tone with me, young man.
The youth of today has no manners. Programmers not been seen nor heard but merely inferred from the existance of computer programs.
I am sure WinAmp does do something very similar, but WinAmp is made in C++ which can actually do something like that at a speed which is reasonable. I, however, have to deal with the wild, lashing Proteus that is Visual Basic. And therefore I was wondering if there was perhaps another way.
A third way?
(I'll take silence as a no)
-
May 14th, 2001, 04:18 PM
#6
Sorry if I offended you, no Tone was intended, I thought we had merely crossed wires and was trying to clarify.
If you have tried the solution offered and it wasn't good enough for what you want that's fine, my misunderstanding.
-
May 15th, 2001, 02:02 PM
#7
Thread Starter
Fanatic Member
Thank you very much Mr Young
I did try it, but I found that there was a bit of a delay (probably due too my poor little hamster tiring while it was running the computer) , but thank you for answering which is more than the other 18285 members could do.
-
Jun 13th, 2001, 01:03 PM
#8
New Member
actually, i used that both the API and non-API techniques a while ago on a project(i hate the annoying dotted-dragger as well) and i didn't experience any delay w/o API unless i had multiple forms displayed, and it was much simpler and efficient. So, I went the hard route and didn't show modally. It worked well. Oh, and I think the big problem with your post, V(ery), is that it took too long to read. Next time take a big breath before posting, and just spit out your question. Saves time for all us forum browsers. Thanks.
-
Jun 18th, 2001, 05:12 PM
#9
... Or just don't use weirdly shaped windows.
I hate it when programs think they need to get funky and make windows that aren't rectangles. I usually throw such programs out without further testing.
-
Jun 19th, 2001, 07:36 AM
#10
Fanatic Member
don't know if this might give you a pointer in the right direction:
http://groups.google.com/groups?q=dr...ws.clarion.com
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
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
|