Tnx for the reply but what i actualy need is a kind of elipse health meter (like in diablo if u know it)
The underdog
Posts
-
Multicolor Ellipse -
Multicolor EllipseI have drawn an ellipse without problem. Now i want to fill the top part with a red color and the bottom part with a blue color and i have no clue how to do it. Can anyone help me?
-
Sending dataHi Ppl, I have a small question. Is it possible to use sendto to send entire structs / arrays with a few commands? Right now i have a function to create one long string and an other one to make it back to an array but this kind of in efficient and the data u can send is pretty limited. Can anyone tell me how to send data in an efficient way? Kind regards , Jacco
-
Passive/Active listening serverYo Mik :-D, Its working perfect the only small problem i got left is when i want to add the recieved stuff to a listbox i get the following error : Additional information: Cross-thread operation not valid: Control 'lbReceived' accessed from a thread other than the thread it was created on. Any idea how i can fix this ? Greetings , Jacco
-
Passive/Active listening serverYo Mik, Tnx a lot for you're answer. I have read some tuts on threading but they are not really clear to me. If u have time and u know one please tell me :). I'm not in a big hurry so ...... Again tnx.
-
Passive/Active listening serverI have a question. Right now i have made a server. It works just fine but there is a problem. I need to push a button in order to recieve data. I would like suggestions (and examples) how i can create a server wich regularly (always?) listens if data is sendt. Can anyone help me with this?
-
Get connected clientsI have build a server application with Sockets. My question is simple. Is it possible to see how many and what clients are connected? If yes then how? Kind Regards , Jacco
-
Client/server communicationI ow u one Tnx a lot :D
-
Client/server communicationI guess this means its a prob on the server. Here is the server code. private void Form1_Load(object sender, EventArgs e) { sokje = new Socket(AddressFamily.InterNetwork, SocketType.Stream , ProtocolType.Tcp); IPHostEntry ipHostInfo = Dns.Resolve(Dns.GetHostName()); IPAddress ipAddress = ipHostInfo.AddressList[0]; localEndPoint = new IPEndPoint(ipAddress, 11000); sokje.Bind(localEndPoint); sokje.Listen(5); } private void button1_Click(object sender, EventArgs e) { sender = new IPEndPoint(Dns.Resolve(IPAddress.Any.ToString()).AddressList[0] , 11000); EndPoint senderRemote = (EndPoint)sender clSocket = sokje.Accept(); int ontvangen; //sokje.Bind(localEndPoint); byte[] data = new Byte[256]; ontvangen = sokje.Receive(data); } I'm really sorry but i dont understand most of the explanation. Could u give a hint what to place where? Because i onestly dont know Kind Regards, Jacco
-
Client/server communicationprivate void button1_Click(object sender, EventArgs e) { byte[] data = Encoding.ASCII.GetBytes("This is a test"); sokje.SendTo(data, eindPunt); }
This is the code i use for sending data to the server. This goes without an error (Though im not shure if its correct so comment is welcome)./* IPHostEntry survur = Dns.GetHostEntry("Jacco"); sokje.Connect(survur.AddressList[0],11000); eindPunt = new IPEndPoint(survur.AddressList[0] , 11000); */ private void button1_Click(object sender, EventArgs e) { sokje.Listen(5); sender = new IPEndPoint(Dns.Resolve(IPAddress.Any.ToString()).AddressList[0] , 11000); EndPoint senderRemote = (EndPoint)sender; int ontvangen; //sokje.Bind(localEndPoint); byte[] data = new Byte[256]; ontvangen = Convert.ToInt16(sokje.Receive(data)); }
This is the code i use to recieve messages. This gives me this error : An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll With the following comment : Socket is not connected and sender has not given an adress The purpose of the program : It doesn't really have a purpose yet. Im just expirimenting with c# a bit. For the future i plan on creating some gaming stuff (poker or so) freeware offcourse. My question : Can someone explain to me why this is not working and the way im supposed to make it? i started networking only 1 week a go so i would preffer a (relative) easy explanation. Kind regards Jacco -
Get ButtonI have a little problem I got a form with a lot off buttons. i use this code to get the Text of the button i pushed: string naam,naam2; naam=sender.ToString(); naam2=naam.Substring(35); textBox1.Text=naam2; But the problem is i want to change the color of that button as well. Could someone tell me how i can determin witch button i pussed with appling just one piece of code to all the buttons?
-
Mouse positionAl of you people wil know how to get the position of the mouse pointer in a textBox. But mij problem is i need to get my mouse pointer to a position given in 2 textboxes. Can anyone tell me how to do this because i don't have a clue The underdog
-
KeypressI want to make a program that wil work with the arrow keys. Now i got two questions. First of al what is the code of an arrow key in c# and second how can i use it properly. The Underdog
-
Online DatabaseHi, i got an access database on a FTP-server. Can anyone tell me how i can get to that database in a .net database application? The underdog
-
Tabels & ComboboxesI get the containment of the Table. So that works as it should But how to go on now? The underdog
-
Tabels & ComboboxesHi I got an access database. is it possible to put the tables of this database in a combobox? If yes then how? the underdog
-
TabelsHy, I got a question. i got an access-database. Is it possible to put all the tabels in the database in a combobox so i can select one from the combobox? The underdog
-
Online Database?I was wondering is it possible to use a online database in a local application? And yes how? Is it also possible to use a My SQL database in a progam and again yes how? Could someone help me please im trying for months now The_Underdog