Results 1 to 23 of 23

Thread: Form Location

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432

    Form Location

    can some one help me i nee to get the Forms Location on Screen

    the X and Y posisions so it can


    Example :
    if the Form is at the Top Left Of the Screen at 0,0
    X = 0 Y =0

    Please Help

  2. #2
    Addicted Member CoMMiE's Avatar
    Join Date
    Jul 2000
    Location
    Malaysia, Kuala Lumpur
    Posts
    179
    Hi
    maybe you could try this

    Me.Left()
    Me.Top()

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432
    ya ill try that if anyone know of a better way to Dock Forms so they Dock Togather im Open and NO the "Magic Control" is not the Kinda docking im looking for

  4. #4
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228
    What 308holes here is asking for really is STICKY FORMS!
    Luke

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432
    *BUMP*

  6. #6
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    So did the Me.Left/Top not work? If it returns 0 or something like that then it is probably returning the relateive to the client. You can translate it to a point on the screen with the Me.PointToScreen:

    VB Code:
    1. Dim p As Point = Me.PointToScreen(New Point(Me.Left, Me.Top))

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432
    ok must try that

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432
    OK that didnt work i just need something to make my forms stucky!

  9. #9
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Well what do you have so far? What didn't work about it? Does it give you an error?

    It seems like once they are sinked up the first time then you can move them through the LocationChanged event.

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432
    ya i have to get them linked fist tryed the me checked to see if their Lefts and Bottoms where = or = to +10 to link them but it wont do it

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432
    OK i Found but i dont know Delphi can some on convert it ?

    http://delphi.about.com/library/weekly/aa070301a.htm

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432
    *BUMP* COME ONE SOMEONE HAS TO KNOW !!

  13. #13
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Hey that code docks the form to the sides of the screen not to the sides of other forms. Is that what you want?

    If not and you want it to stick to other forms, then which forms? Other ones in your project? Just random any form?

    I tried converting that code but I must have missed something because it didn't work.

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432
    i want it to stick forms from the same program togather

  15. #15
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Try this. If its not what you want hopefully it'll be a start at least. I didn't really comment much. Push the button on the form to create more forms and they will snap to any of each other. The buffer const is the distance they must be in to snap together.

  16. #16

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432
    ya that works is their a way to override the mouse so it lts gooo because the form flickers like a MOFO

  17. #17
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    I don't know I didn't get any flicker and I don't know what 'gooo' is.

  18. #18

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432
    lol was kinda late

    the Form jumps back and forth on my screen because the mouse is still in control of the forms movement and when the forms try to dock they jump back and forth from the dock to the mouse

  19. #19
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Can't help you withthe flicker I'm not really getting flick, except maybe one quick one when it first snaps into place. It happens too fast to do anything about. Although there is a but if the forms are different sizes here is a fixed version for that.

  20. #20
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228
    Maybe i'll write an OCX for this.
    Luke

  21. #21
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Did you really mean OCX, even though .NET doesn't make OCX as its controls?

  22. #22
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228
    Originally posted by Edneeis
    Did you really mean OCX, even though .NET doesn't make OCX as its controls?
    Can't i use an OCX (written in VB6) in .NET though?
    Luke

  23. #23
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    I believe most of them work but they may not be stable.

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