Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8646371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:47:24+00:00 2026-06-12T12:47:24+00:00

I’ve been trying to do this for a few hours now, but for the

  • 0

I’ve been trying to do this for a few hours now, but for the life of me I can’t make it possible.

What I’m trying to do is simply move the image found within a picture box in a winform application. My image is roughly 1000×1000 pixels and my box is something arbitrary like 400×500, so, for example, when I click the mouse I’d want the image to move 50 to the left. But the image box should remain the same size.

For the life of me, however, I can’t get this to work. What I have been able to do is the following:

     if (kinectController.hands[0].fingertips.Count == 1)
        {
            pictureBox1.SizeMode = PictureBoxSizeMode.CenterImage;

        }

This function is for my kinect finger tracking app. So when the application finds a single finder point visiable on the screen, the image is centered. However, I would eventually like the image to move along with my finger movement, which will come once I work out the basic step of moving the image a few pixels to the side.

Any help with this would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:47:25+00:00Added an answer on June 12, 2026 at 12:47 pm

    I did a little bit of research and apparently moving an image within a PictureBox is no easy task, at the very least I couldn’t find anything that would make this possible (not saying there isn’t a way to do it though).

    However, I came up with a bit of a “workaround”, see if this fits your needs. To accomplish this:

    • Create a Panel control, and size it to however much of the image you
      would like to display
    • Inside that panel place a PictureBox control with your image in it
      and set the SizeMode property to AutoSize.

    Now, put this code in your form

    private bool Dragging;
    private int xPos;
    private int yPos;
    private void pictureBox1_MouseUp(object sender, MouseEventArgs e) { Dragging = false; }
    private void pictureBox1_MouseDown(object sender, MouseEventArgs e) {
        if (e.Button == MouseButtons.Left) { 
            Dragging = true;
            xPos = e.X;
            yPos = e.Y;
        }
    }
    private void pictureBox1_MouseMove(object sender, MouseEventArgs e) {
        Control c = sender as Control;
        if (Dragging && c!= null) {
            c.Top = e.Y + c.Top - yPos;
            c.Left = e.X + c.Left - xPos;
        }
    }
    

    Now whenever you click and drag on the PictureBox, it won’t actually move the image within it, but the PictureBox control within the panel. Again, not exactly what you were looking for and I’m not sure how this would convert over to Kinect, but I hope this gets you on the right track.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
This could be a duplicate question, but I have no idea what search terms
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.