Actually I'm not keeping track of my threads at all. I'm quite new to them and I'm still learning on how to handle them. Right now when I need to start a thread in a function I just make a new instance of Thread t and start it. I was under the impression that once the start function ended the...
Hello,
I have a program that runs threads for networking, and whenever I close it by pressing the X button in the top right corner the program threads still run, so I have to go to the task manager every time to close it. The only event I have is Server_Closing which is as follows:
private...
Fixed it.
After learning a bit more about threads I realized using delegates and events would work perfectly. I just ran an event after the thread function ended which updated the UI.
'Lo all,
I'm programming a card game and am trying to add networking capabilities so you can play against somebody on another computer connected to the network. My question is basically on threading, but I'm new to both threading and networking so any advice would be greatly appreciated...
I actually ended up just transfering a string array with data that can be interpreted on the other side into cards, because making another card class would just be a pain.
I am doing my networking by using TcpListener and TcpClient classes. I read that this was the simplest way of networking...
Hey all,
I'm writing a card game and am implementing network capability. The cards.dll I downloaded from a site isn't serialized. Is there a way to make an inherited class that is serializable or am I forced to find another class or means of sending the card data? I'm new on networking so my...
Yeah you're right, but I was thinking there might be a way to literally move the card continuously across a line rather than display it at certain intervals along the way, but I might be wrong.
I'll do the straight line method first, but just curious, how do most people do something like...
Hello programmers!
I have a cribbage card game programmed and I want to have cards move from one place to another as in dealing the cards to players' hands. I can't figure out how I would go around doing this. My first guess was to have a function that would move the card along a straight...
Hello programmers,
I am writing a Cribbage card game using GDI+ in C#. I've pretty much completed the game itself but I want to have make it so one can play someone in their network in cribbage (there is no point in playing a two player card game on one computer anyway). I'm a beginner when...
Why not? Isn't that what you're doing when you're adding a new Event Handler for each card? (Like your example above). What would be the better way of going about this?
Btw, thanks a lot for your responses.
Wow, I didn't know that you could have multiple controls fire off the same event. I'm not a fan of using the design feature in Visual Studio 'cause I enjoy the coding aspect a lot more. If you wanted to code that would it be like this?
control1.Click += new MouseEventHandler(control_Click)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.