Results 1 to 4 of 4

Thread: Card Game

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    5

    Unhappy Card Game

    I'm trying to take a big step with my programming experience but I'm not having any luck. I'm using Visual Studio.NET and largely VB.NET at that. What I am attempting to do is create a custom control to use in card games. Yes, I know that other dll's and ocx's exist, but that doesn't show me how it is done. I have an idea, which may be incorrect, of creating a class for a deck of 52 cards...each card being a class of its own.

    I have learned some basics to VB.NET graphics and have drawn a rectangular box, filled in with a color, moved it around without flicker, but if, say, a button control moved over the rectangle, the rectangle under the button would disappear. So this is why I reasoned a custom control may be better than just several instance objects. I'm looking for much advice and guidance with this, so I can move to bigger and better projects. If anyone is willing to help, please email me at [email protected] and thank you in advance.

  2. #2
    Member Penavin's Avatar
    Join Date
    Oct 2001
    Location
    Sisak, Croatia
    Posts
    42

    Unhappy What about Preference)

    Hi! I can't help you, but I am interested for this kind of problem. What game do you have in mind?
    Penavin

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    5

    Card Game

    Well mostly this entire idea would allow me to use the deck of cards (or multiple decks of cards) to play all kinds of card games. My initial idea was just to create solitaire. But I didn't want to just create an array of picture boxes that all load a card image. I believed that was inefficient. So I'm hoping for some help with custom controls and painting/rendering custom controls. Thanks.

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    5

    Exclamation A little progress, help still needed

    Well I have been able to create a card type custom object now that I have been able to move around a form. This is huge progress for me and I still have the code I'm working with if it may be of help to anyone to see what else I need to learn to do.

    However, I have a different, less painful (I believe) problem. My z-order doesn't seem to really reflect anything about which card is being moved or anything. Instead, it is only the order in which they are created. I have tried a sendtoback() and bringtofront() call, each, but they seem ineffectual. I'm sure I need to override them and account for this in the OnPaint of the card custom objects. Except, what kind of painting/rendering code is used for z-order? Any z-order information relating to custom controls would be helpful, thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width