[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Suggestions on what Control(s) to use.

Posted on 2004-10-27
5
Medium Priority
?
163 Views
Last Modified: 2010-04-23
Ive written quite a few standard windows apps in .NET, but ive never really played with game programming, since my dog ate all my Connect-4 pieces not very long ago, I figured that writing a Connect-4 app would be a nice place to kick things off.  Before ive written even one line of code for it im mildly boggled at which control im going to use, none of the standard ones seem like they'll do the job, so it may be a custom control i end up using.

So some general suggestions on which grids or other controls may do the trick, either a standard one im missing, or misusing, if your suggesting custom controls, it would be preferable that they are cheap and/or free for non commerical apps

Thanks
Jaz
0
Comment
Question by:jazduck
  • 2
  • 2
5 Comments
 
LVL 86

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 800 total points
ID: 12430486
You can do the entire app in a PictureBox by drawing the board and the pieces ,and then reacting accordingly to mouse moves and mouse clicks for the PictureBox.

You can create a class to represent the pieces and pass a reference to the PictureBox into them so they can paint themselves at their current position.  Store all the instances of the pieces in an ArrayList.  When the mouse moves or is clicked on the PictureBox, you can iterate the pieces in the ArrayList and query each on to determine if they are being acted upon by the user.

~IM
0
 
LVL 18

Accepted Solution

by:
armoghan earned 800 total points
ID: 12431627
connect -4 is a simple game,
yuo dont need high grphics or even picture box in it. You can just use square Labels or buttons and on click change the Background Color

0
 
LVL 18

Expert Comment

by:armoghan
ID: 12431651
see this example if you need to use much graphics, lay one image over the other
http://www.codeproject.com/csharp/blackjack.asp
0
 
LVL 3

Author Comment

by:jazduck
ID: 12541342
Sorry for the long delay in replying.  Went on holiday, now im back ill finalise within a few days once ive had a play with both your ideas.

Jaz
0
 
LVL 3

Author Comment

by:jazduck
ID: 12611112
Thanks guys, got a few ideas off both of you and have a semi-working version.
I upped points a few and will split.

Jaz
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question