Hi, I'd like to know why after calling _tcpClient.Client.LingerState = new LingerOption(false, 0); _tcpClient.Client.Shutdown(SocketShutdown.Both); _tcpClient.Client.Disconnect(true); , when I try to connect again, I get a Socket already connected exception. I dont know what else to try, please help!
Chals
Posts
-
Reusing a socket -
Updating databound control from another threadHi there, I have a DataGridView bound to a BindingSource, and this BindingSource is bound to a BindingList of custom objects. The list is updated from another thread, and when it tries to update the DataGridView it (understandably) crashes because the control was created in the main thread while the list was updated in a worker thread. I know you can use Invoke to solve cross threading problems but in this case I have no clue on what event I should use Invoke. I dont even know if I should be looking at the BindingSource or the DataGridView itself. I've ran out of ideas and Im finding this pretty frustrating, any help would be greatly appreciated. Thanks in advance!
-
Corel CMX plugin?Hi, I'm looking for a plugin that allows to open Corel CMX files. I know this is a rather unusual request, but any help would be greatly appreciated. Thanks in advance.
-
Getting protected controls using reflectionHi, I am inspecting an assembly that has a form, and this form has some controls that are inherited from a BaseForm class. Using GetFields I get to know its controls. However, the inherited controls do not show. I have set BindingFlags as follows: BindingFlags flags = BindingFlags.Instance | BindingFlags.NonPublic; Am I missing something, any ideas? Thanks in advance.
-
DataColumn.Caption not workingNope, columns are all autogenerated, but the header text displays the column name, not the value set in the caption property...and according to help, caption should be displayed.
-
Where is my settings variables saved ?Each project has a different settings file, make sure you are looking into the right one. Other than that, as you already know, settings are always stored as XML, cant think of any other place they are stored in. Hope that helps :)
-
DataColumn.Caption not workingHi, I have a typed dataset which I bind a DataGridView to, and I have set the caption property of the columns in my dataset. However, when binded, the datagridview is showing the ColumnName value, not the Caption. Am I doing something wrong? I thought that setting Caption would make the DataGridView use it. Sorry if this has been asked before, search didnt yield any results :~
-
Databinding a string ignores DBNullsHi, I've created a control which has a string field, accessed through a bindable property. However, when the control is in a form, and the bindingsource has a null value in the binded property, the value of the string is never updated. I've tried using the advanced databinding properties to set an empty string when the incoming value is null, but no luck so far. Any ideas? thanks in advance
-
Putting a specific row first in a datagridviewHi there fellow programmers! I have a datagridview with say 20 rows, and I know that only ONE of them has a certain value in one of its cells. What I want to do is displaying this one row in top of the others, so it shows itself first. There is no way i can set it first via sorting, and the FirstDisplayedScrollingRowIndex property doesnt seem to work unless Im doing something wrong - I'm setting in there the index of the row. Any ideas? Thanks in advance
-
Sending the active window to the printerHi fellow programmers, I have a MDI app and I'm trying to send the active window to the printer, but no luck so far :-( Any ideas? Thanks in advance
-
Memory mapped filesOk I'll have to think of a workaround. Anyway thanks for your help :)
-
Memory mapped filesOk sorry I didnt explain myself very clearly: What I want to do is to start a process over the file I got in a byte[] format, as if was doing the following: System.Diagnostics.Process.Start(myFile); but instead of pointing to a physical file, I want to 'open' it from memory.
-
Memory mapped filesHi, I'm downloading a byte[] from a web service which is actually a file. I'd like to open it without having to write it to disk - mapping it to memory, but can't find a way to do it. Any help would be greatly appreciated, thanks in advance
-
Clearing a data binded imageHi! I have a user control with a PictureBox control. This picturebox's image is data binded to a binary field in the database. When I set the image, it works fine: image is saved in the DB and everythings fine. Now, when I want to CLEAR the image, I do the following: this.picImage.Image.Dispose(); this.picImage.Image = null; and...nothing happens. The next time I open the form, the image is still there. The binding is correct because if I change the bitmap, it is saved properly. It seems to be ignoring the null value Im trying to persist in the database. I'm using Visual Studio 2005 and SQL Server 2005. Help! Thanks in advance :)
-
How did the user close the form?Thanks!!! That worked like a charm
-
How did the user close the form?Damn...thats bad. Thanks for your help guys
-
How did the user close the form?Yeah, well...thanks for the reply, but I was looking for a non-flag solution, thats the easy way :)
-
How did the user close the form?Hi, I'm doing a windows app and I need to know if the user pushed the red X button in the top right of my form. I know the Form_closing has an enum telling the reason of the form close, but it doesnt specify if it was my own cancel button or the X button, and I need to know it. Any ideas? Thanks in advance
-
CheckedListBox data bindingHello, Anyone know how to bind a CheckedListBox to a table so that every checked item generates a new row in another table? DataSource and DataMember do not seem to work :-( Thanks in advance
-
.NET to COM+ and vice versaHi, I'm trying to register a .NET assembly to COM+, and later use these COM+ services again in a .NET client application in a transaction context. So far, I've been able to get my .NET assemblies into the W2003 server component manager by registering them into the GAC using regsvcs. Then I exported the components as application proxies, so my client has access to the server where the COM+ components are hosted. I install them in my client, but when I try to add a reference it says: "The ActiveX type library was exported from a .NET assembly and can not be added as reference. Add a reference to the .NET assembly instead" Sorry if this has been asked before, searched for it but nothing showed up. Any help on what Im doing wrong would be greatly appreciated. Thanks in advance