Click here to Skip to main content
15,867,330 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to create a game, Backgammon.

I used Photoshop design my nuts and board.
I saved nut as .png and board as .jpg for each that I have in game I created a picture box and I bound .png picture to that.

I know that this way is not correct.

Please give me tips and guidelines.

What element do I replace instead of pictureboxes and what is the way for moving nuts for the best performance and memory usage.

I put my board in a panel and panel's Dock is fill in my form but I know it's not correct to put 30 picture boxes in form and moving them.

My game is 2d.

My challenge is to keeping nuts and moving them.
What is a better way than using pictureboxes?
Posted
Updated 16-Aug-10 10:09am
v3
Comments
Dalek Dave 16-Aug-10 16:11pm    
Edited for Readability, Spelling, Grammar and Syntax.

1 solution

Why do you need something better than a picturebox? Also, I recommend you use XNA if you're making a graphics intensive game. Using Windows Forms isn't really that great for this type of software. WPF is another option you might consider. It has excellent graphics support. If you don't want to use XNA or WPF, you can paint the elements yourself by overriding the OnPaint method.
 
Share this answer
 
Comments
shahin.kiassat 16-Aug-10 15:39pm    
thank you.
overriding Onpaint method of my form?
how?
what is it useful for?
please describe more if possible.
AspDotNetDev 16-Aug-10 15:49pm    
Try Googling for how to do it... there are tons of resources out there. Performing your own paint method will make things more lightweight than using a bunch of pictureboxes (less memory consumption, and less UI interaction).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900