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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:53:49+00:00 2026-06-02T11:53:49+00:00

I am making a game and I have to redraw about 40 objects on

  • 0

I am making a game and I have to redraw about 40 objects on each Timer tick. I have about 7 classes with different Draw(Picturebox ^ pictureBox) methods. As you see I pass pictureBox pointer for each object draw method. As the objects are so many and maybe will be a little more, the pictureBox is flickering, because it draws each object after object. Is there a simple way to fix the flickering? Maybe somehow prepare the image and then show it on the PictureBox?

  • 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-02T11:53:56+00:00Added an answer on June 2, 2026 at 11:53 am

    7 classes with different Draw(Picturebox ^ pictureBox) methods

    That signature is very likely to create flicker. Because in order to take advantage of the double-buffering built into PictureBox, you have to also pass a Graphics object. The one you got from the Paint event. You are probably using CreateGraphics() now, a serious flicker bug.

    The proper signature is Draw(Graphics^ graphics) and used like this:

    private: 
        void pictureBox1_Paint(Object^ sender, PaintEventArgs^ e) {
            for each (GameObject^ obj in gameObjects) {
                obj->Draw(e->Graphics);
            }
        }
    
        void timer1_Tick(Object^sender, EventArgs^ e) {
            updateGame();               // move stuff around
            pictureBox1->Invalidate();  // redraw scene
        }
    

    With the assumption that you added the event handlers for the PictureBox and Timer control.

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

Sidebar

Related Questions

I am making a game, I have got several different classes as I dont
I'm making a game where I have must have some objects like weapons and
We are making a game with a playing character that will have several different
I'm making a game in XNA, but since I have people with different operating
I'm planning on making a game and want the window to have 3 different
I am making a game and I have an options page which turns the
I am making a game where I have a back ground image of a
I am making a game for my CS class and the sprites I have
I'm making this game where I'm trying to pair people. So I have this
I am making a game that needs a crosshair. I have been playing with

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.