Results 1 to 10 of 10

Thread: Back in the old days we didn't have these problems...

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516

    Question Back in the old days we didn't have these problems...

    And I was not referring to laws on paedophilia, but instead of skinning forms for computer owners who have their Windows Operation System set to drag an outline rectangle instead of the whole form.

    When I now proceed to drag my little skinned thing which one could only call a 'thing' its size increases and it becomes a rectangle, confusing the poor brain-dead incompetent blundering harlequin who will inevitably end up using this: Me. Okay, and perhaps some others.

    However WinAmp has perfected the art of dragging normally (no little dotty rectangle is displayed)

    And if you or any of the technical genii at NullSoft could inform me, o petty me, o meagre, pitiful me, as to how this can be achieved, I would be greatly ... chuffed.

    So there.

    Thank you for your time.
    Time is money.
    Money is knowledge.
    Knowledge is power.
    Thank you for your power.

    Wait a minute...

    I'd like to use some of these smilies...





    Thank you.
    Courgettes.

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    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

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516

    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?
    Courgettes.

  4. #4
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    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.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516


    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)
    Courgettes.

  6. #6
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    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.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    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.
    Courgettes.

  8. #8
    New Member
    Join Date
    Feb 2001
    Posts
    5

    Red face

    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.

  9. #9
    letxa2000
    Guest
    ... 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.

  10. #10
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    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
  •  



Click Here to Expand Forum to Full Width