Results 1 to 40 of 44

Thread: Movable Dynamic Controls

Threaded View

  1. #40
    Member
    Join Date
    Feb 2010
    Posts
    36

    Re: Movable Dynamic Controls

    and if they're in the panel:

    vb Code:
    1. worker.boundControls.Add(New MoveResizeControl.controlHandler.boundControl(Panel1, Button1))

    then you also need to use the panel's MouseDown + Paint events instead of the form's events
    It works great, but when I drag the control over the initial size of the panel, the auto scroll function is on and is extending the size of panel, when I click on any place of the panel, a running error occurs (NullReferenceException - Object reference not set to an instance of an object.)... So what should I do to handle this type of error???


    vb Code:
    1. Private Sub mControl_Move(ByVal sender As Object, ByVal e As System.EventArgs)
    2.         activeControl.Invalidate() '<-- This line having error
    3.         Application.DoEvents()
    4.         drawBoundingRectangle()
    5.         paintresize()
    6. End Sub
    Last edited by tearsculprit; Mar 17th, 2010 at 09:31 PM.

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