Results 1 to 4 of 4

Thread: [RESOLVED] Resize Control + Position

  1. #1

    Thread Starter
    Addicted Member Tengkorak's Avatar
    Join Date
    Nov 2006
    Posts
    240

    Resolved [RESOLVED] Resize Control + Position

    I have a user control where in the user control that there are 3 other controls for the PictureBox, button1 and button2.
    for the PictureBox control I want to resize when the user control in he will change length and width.
    button1 and button2 whereas only change in the position left alone.

    I include the following examples in resize images before and after.

    thank you
    Attached Images Attached Images   

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: Resize Control + Position

    try this:

    vb Code:
    1. Private Sub PictureBox1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.Resize
    2.     Button1.Left = PictureBox1.Right + 12
    3. End Sub

  3. #3

    Thread Starter
    Addicted Member Tengkorak's Avatar
    Join Date
    Nov 2006
    Posts
    240

    Re: Resize Control + Position

    thank you
    I think there are also properties such as anchors, which are used to adjust the left and top position of an object.

  4. #4
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: Resize Control + Position

    controls do have an anchor property but it doesn't work relative to another control

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