Suggestions on what Control(s) to use.

Posted on 2004-10-27
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

Question by:jazduck
    LVL 85

    Assisted Solution

    by:Mike Tomlinson
    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.

    LVL 18

    Accepted Solution

    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

    LVL 18

    Expert Comment

    see this example if you need to use much graphics, lay one image over the other
    LVL 3

    Author Comment

    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.

    LVL 3

    Author Comment

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


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
    Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    884 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now