Results 1 to 2 of 2

Thread: avatar editor

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2009
    Posts
    4

    avatar editor

    I am trying to build an avatar editor and want to add a scroll bar to enable the use to resize and move the position of facial features. Would a scrollbar be the easiest way or is there another way that this could be done?

    I have managed to get a scrollbar to move images up and down but they move to the top left hand corner before they move, and move back to the original spot when the other scrollbar is moved. This is my code:

    Private Sub HScrollBar1_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles HScrollBar1.Scroll
    If RadioButton3.Checked = True Then
    Dim NewLocation As New Point
    NewLocation.X = HScrollBar1.Value * +1
    PictureBox03.Location = NewLocation
    End If

    Can anyone help? I am using Visual Basic 2008 Express Edition.
    Thanks

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: avatar editor

    When the new Point is initialized, its X and Y values are 0.

    You're only updating the X value.. whereas the Y value will still be 0, therefore, the Y position of the PictureBox will be 0.. and therefore, at the top lefthand corner.

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

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