Hello programmers,
I'm creating a cribbage game using Visual Studio Visual C# as well as cards.dll. I'm creating a graphical interface where it displays the cards in each hand. My problem is is that I want to make it so that when you click and hold the mouse (MouseDown) on any card in the hand it will become highlighted.
I could create events for each individual card in the hand, but that would be very tedious and seemingly inefficient. What I'm asking is if there is a way to create an event that fires for each card in the hand w/o having to create many duplicate events. Essentially, when I add a card to a hand I want it to have the event mentioned above, but whenever you create an event you have to specify exactly what control it relates to. I want it so that whenever you add a card it automatically creates the event for that card. Can anybody help or lead me in a direction to solve this problem?
Thanks a ton,
-- Andrew
I'm creating a cribbage game using Visual Studio Visual C# as well as cards.dll. I'm creating a graphical interface where it displays the cards in each hand. My problem is is that I want to make it so that when you click and hold the mouse (MouseDown) on any card in the hand it will become highlighted.
I could create events for each individual card in the hand, but that would be very tedious and seemingly inefficient. What I'm asking is if there is a way to create an event that fires for each card in the hand w/o having to create many duplicate events. Essentially, when I add a card to a hand I want it to have the event mentioned above, but whenever you create an event you have to specify exactly what control it relates to. I want it so that whenever you add a card it automatically creates the event for that card. Can anybody help or lead me in a direction to solve this problem?
Thanks a ton,
-- Andrew