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

  • Home
  • SEARCH
  • 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 844931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:21:54+00:00 2026-05-15T06:21:54+00:00

I just started on the .net compact framework. I want to draw a Sudoku

  • 0

I just started on the .net compact framework. I want to draw a Sudoku field on the screen. So I put down a PictureBox and defined a method for the Paint event:

private void pictureBoxPlayfield_Paint(object sender, PaintEventArgs e)
{
    // use e.Graphics to draw the grid, numbers and cursor
}

This works, but you can see as the grid is drawn. So my question is, what is the right/better way to create such a custom control? Is there maybe a way to enable double buffering?

  • 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-15T06:21:54+00:00Added an answer on May 15, 2026 at 6:21 am

    There is no built-in support for double buffering in the Compact Framework. You can add it yourself, PictureBox already supports the Image property. Create a Bitmap in the constructor and assign it to Image. You don’t need the Paint event anymore, the one provided by PictureBox already draws it to the screen.

    Whenever the image needs to change, create a Graphics object with Graphics.FromImage(), passing the PB’s Image and draw your stuff. Call the PB’s Invalidate() method to tell it that it needs to redraw the image. If you still see flicker, override the PB’s OnPaintBackground() method and do nothing.

    The only other consideration is handling resizing, you’d need a larger or smaller Bitmap. Not so sure that would be necessary for a game.

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

Sidebar

Related Questions

I've just started programming in VB.Net and don't want to use Dreamweaver to do
I have just started working in jQuery and ASP.NET MVC. I want the same
I just started using TestDriven.NET to debug on my tests, here is my setup
I’ve only just started using ASP.NET MVC, and I have a somewhat trivial question:
Just started getting a bunch of errors on our C# .Net app that seemed
Have just started playing with ASP.NET MVC and have stumbled over the following situation.
I just started to learn Ruby and as a .Net developer, I'm wondering if
I just started using the WPF WebBrowser that is included in Net 3.5 SP1.
I've just started skimming 'Debugging MS .Net 2.0 Applications' by John Robbins, and have
I've just started working on an ASP.NET project which I hope to open source

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.