koopa
❔ ContextSwitchDeadlock
Hi - in my windows form program I generate some RSA keys before the program loads, this takes around 2 minutes though and after 60 seconds the program crashes due to taking too long - how would I go about preventing this? I don't know much about threads and stuff
6 replies
Prevent scrollbar from jumping down when viewing a list?
Hi - I'm making a chat room in windows forms and have a listbox that displays all the messages recieved, ofcourse I have the chatbox set to automatically scroll to the bottom when a new item is sent. However, if the user is looking at old messages and a new item is sent, the scroll bar immediately jumps to the bottom.
I was thinking that I could do something like if(scrollBarPosition > scrollBarBottom) doNotJumpToBottom
except I can't seem to find any scroll bar position variable.
This is my jump to the bottom code:
1 replies
Disconnect a client from a TCPServer csharp
Hi - I have a basic client server chat room model which I'm working on for a school project. I'm trying to program a /kick feature to disconnect a client from the server, however TCPClient.Close() and TCPClient.Client.Disconnect() do not seem to be working - as in the client thinks that it is still connected, not sure whether I just need to update the client that it is not connected or whether I should use a different disconnect method.
7 replies
Not sure how the byte[] works in Csharp
Hi, basically I have a very simple program which I'm using to try and understand how bytes work:
It is my understanding that the integers printed should be the 4 ascii values for "Test" and nothing more, instead this is printed (grouped into sets of 4 for easier reading):
And I am unsure as to why, could anyone be of assistance please
9 replies