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 6137207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:41:49+00:00 2026-05-23T17:41:49+00:00

I have a picturebox with a fixed sized image (256×256) generated by the program.

  • 0

I have a picturebox with a fixed sized image (256×256) generated by the program. I have another smaller image as a resource. What I want to do is when my cursor is over the image and I hold down the mouse button, the smaller image “anchors” with the mouse pointer so it moves around with it. If I let go of the mouse button, the smaller image will stay in that position on top of the bigger image. The smaller image is basically a marker, something like an X or O.

I was thinking of having a second picturebox on top of the first picturebox but I can’t make it transparent. Or redrawing the image with the smaller image on top of it and reloading the image into the picturebox, but I’m not sure how to do that and I think it’s going to be pretty slow redrawing it each time I move the mouse.

So how can I have a marker image move around on top of a bigger image and have it stay there?

  • 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-05-23T17:41:49+00:00Added an answer on May 23, 2026 at 5:41 pm

    Create your control for this instead of using PictureBox. PictureBox should be used ONLY for fixed images on the form, nothing else.

    Instead, derive your control from UserControl. Turn on double buffering for it. In OnPaint method, first draw your background picture, then your marker picture after it. Don’t worry, it WON’T be slow and it WILL work as it should.

    When you release the mouse, update background picture by drawing your marker picture on it.

    Since every sentence here is a little discovery by itself, hope you’ll have a good time coding your little game 🙂

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

Sidebar

Related Questions

I have a PictureBox control I want to display an image in it. I
I have a control (picturebox), in which I want to draw an 2D image
I have a jpeg shown in a picturebox on my WinForm program, I want
I have an image in a PictureBox, and I want to print it. No
I have a picturebox which displays an image of a music note. I want
I have imported an animated GIF as a resource into a picturebox - unfortunitly
I have an application that displays an image inside of a Windows Forms PictureBox
I'm implementing panning of a large image in a PictureBox control, and I have
Have loaded the image to picturebox in zoom mode. but the text is not
I have a pictureBox inside a Winforms DataRepeater for which I want to set

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.