Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Help :)

Help :)

Scheduled Pinned Locked Moved C#
helpgraphicsquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Moon Boy
    wrote on last edited by
    #1

    I made a Minesweeper. But i have a problem... Every square in the program is a UserControl, and i use Bitmap for the imagens, setting the Background... In the Master Level ( 50x50 ) the program is extremlly heavy and laggy :( What can i do? Other methods to put the images? Thanks.

    H 1 Reply Last reply
    0
    • M Moon Boy

      I made a Minesweeper. But i have a problem... Every square in the program is a UserControl, and i use Bitmap for the imagens, setting the Background... In the Master Level ( 50x50 ) the program is extremlly heavy and laggy :( What can i do? Other methods to put the images? Thanks.

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Don't use a UserControl when a simple Control will do. UserControls are containers and have a lot of overhead. Controls are simple objects - like a Button, which might be a better control to extend for your use - and would have less overhead. But, realistically, don't use a control at all. Use a single control (perhaps even the Form itself) that manages the grid and draws the grid accordingly, as well as handling the painting operations by overriding OnPaint. This is a much more common approach and will have much less overhead than using either UserControls or Controls. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups