0 Replies - 473 Views - Last Post: 20 August 2012 - 10:48 PM Rate Topic: -----

#1 KeedonKing  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 57
  • Joined: 12-July 12

Drag And Drop Items into Panel Bounds

Posted 20 August 2012 - 10:48 PM

I am trying to make my form snap to a panel located on my Parentform, but I cannot figue out how to get it to recognize the bounds of the panel. My code should better explain what Im trying to do...

Private Sub SplitChatroom_Move(sender As Object, e As EventArgs) Handles Me.Move
        'This here is my problem. Need the Code for Bounds of my panel.
        'Currently using location, but it only allows me to snap over one pixal?
        'Basically need the form to snap to anyone one of the pixels within the panel.
        If System.Windows.Forms.Cursor.Position = Form1.Panel1.Location Then
            Me.Location = Form1.Panel1.Location
            Me.Width = Form1.Panel1.Width
            Me.Height = Form1.Panel1.Height
        Else
            If System.Windows.Forms.Cursor.Position = Form1.BigPanel.Location Then
                Me.Location = Form1.BigPanel.Location
                Me.Width = Form1.BigPanel.Width
                Me.Height = Form1.BigPanel.Height
            End If
        End If


Is This A Good Question/Topic? 0
  • +

Page 1 of 1