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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:50:54+00:00 2026-05-19T13:50:54+00:00

I want to create a circle object, put it on the screen with a

  • 0

I want to create a circle object, put it on the screen with a velocity, and have it bounce around within the borders. I can setup the circle class just fine, but how do I paint the object (and multiple ones later, say click and you get more circle objects) and show its movement?

  • 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-19T13:50:55+00:00Added an answer on May 19, 2026 at 1:50 pm

    Drawing can be accomplished in at least 3 different ways in .NET (WFA, WPF, and XNA frameworks). For this answer I will assume you’re using the simplest: a WinForms app.

    Drawing/painting custom shapes in .NET is accomplished using the Graphics class. All form controls have a CreateGraphics() method, which gives you a reference to a “box” on the screen with the size and location of the control on which you called the method. Using that Graphics instance, you can call various Draw methods (like DrawCircle()) to put shapes on the screen. You will need to read up on the Pen, Brush and Color objects; they allow you to define the border, fill, and color of your circle. I would place the drawing logic in the control’s OnPaint() method, which is called whenever the window is told to redraw itself. To have your object move at regular intervals, set up a Timer with some regular interval, and subscribe to its Tick event with a handler that will perform the moving logic. After you make each move, call Invalidate() on the control you have the Graphics handle for; that will cause the control to redraw itself. I would avoid getting the graphics handle for an entire form, or any control on which you place other nested controls, because a control that is repainting itself will also tell all its nested controls to repaint themselves. A Panel or PictureBox taking up a span in the form window is the go-to method for custom graphics. You may also consider implementing double-buffered graphics using a BufferedGraphicsContext object, or rolling your own by drawing your custom shapes on a Bitmap that you then set as the image for a PictureBox.

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

Sidebar

Related Questions

I have a Contact class that contains a PortalAccount object. When I want to
I want create a drop shadow around the canvas component in flex. Technically speaking
I want to create a rotating wheel menu which the user can use his/her
i want create something like link_to which can link to request for permission in
I want create for paging a usercontrol. How can I access properties in usercontrol.ascx
If all tables I want to delete from have the column gamer_id can i
Ok. I'm working with GAE. And i want create something like this: I have
I am trying to create a circle with a gradient fill: //I want the
I want to place some handles on a UIView I have on-screen. So, I'm
I want to create a Java application bundle for Mac without using Mac. According

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.