|
So what's the exception type and message that you get thrown? Where is the exception thrown? What is "Body System.Object"?
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Sorry, what I mean to say is that when I am looking at the object during runtime with the debugger, this is the property that is held by the object. I do not actually see an exception being thrown, it is a property of the object. I don't even understand how that is possible, but this is what I see when I debug.
Thanks for your help,
|
|
|
|
|
What object are you reflecting in the debugger where you see that property? And what do you mean by "this is the property that is held by the object"? Are you saying that the object is defined as a certain type, or that the property reference an object that you don't understand?
We don't know what you're thinking nor anything about your project. You need to be as verbose and clear about what you're asking.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hey
I am building a Server/Client program, there i am using Async connection with OnConnect and OnDataRecieved.
When the client is connected to the Servern and the server is closing with out sending any Closing command to the client the client craches.
The error is not handle and there is no code for this error?
I am using try/catch in all functions in this connection class, and no data transfer is made out side this class.
Is there a way to se when the connection is lost like OnDisconnect or somthing?
Best Regards
Jimmy
The Program is built lite this article (http://www.codeproject.com/csharp/socketsincs.asp)
|
|
|
|
|
You might want to tell us what class(es) you're using, since OnConnect and OnDataRecieved could be methods on any class. Is this a class in the .NET BCL, or some third-party library? There are no such methods defined in the .NET BCL 1.x.
Sending a QUIT or similar message is the job of your protocol. You do not get this for free. HTTP, for example, will quit (unless HTTP Keep-alive is being used) once it downloads the HTTP headers plus the body that is described in the Content-length HTTP header. DICT client and server communications are done when the client sends QUIT.
If you're using asynchronous connections you need to handle the exception in the async callback you defined. You should whether or not the server tells the client it's quiting because something could happen. It's the Internet, with lots of routers and gateway and at least two machines which could experience problems.
There would be no OnDisconnect because communications could be interrupted (your gateway or modem drops the connection when data was not being sent) that would not signal the client nor the server code. The only way you'd know is if you were sending data and all of a sudden the data stream stopped unexpectedly. These are the cases you must handle in a client/server application.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I am trying to develop a windows application allowing user to control windows services. I have an ArrayList containing windows services data to be displayed to the user. Except displaying the Service Name and status, I would like to have a column of check box and maybe a column of buttons associated with each row.
I am not sure whether to use Listview or datagrid? and it seems none of them support column of button control?
Can anyone give me some advice on this?
Thank u very much!!
|
|
|
|
|
Hi!
If you want to use a ListView you could take this approach:Embedding Controls in a ListView[^] to "fake" your buttons into the ListView.
Checkboxes can be enabled for the ListView as well, so I think this could work pretty well.
Can't tell you much about the DataGrid, though...
Regards,
mav
|
|
|
|
|
I have this CheckBox Column (DatagridBooleanColumn), i need this to get True/False input from the user, the problem is that at the end of the columns, i can somehow add new rows, How can I make my datagrid Editable but will not alow the user to add new rows when clicking at the bottom, thanks
|
|
|
|
|
Hi gentleman,
I am going to establish a connection to SQL server or MSDE and during that I want to show the user a progressbar to view the wasted time.
I tried different Windows timers in the same class (form timer) or system timer with callback function etc. to let the progressbar run but when I sending the connection command the timer stops until connection timeout event rises or connection establishes.
Is there an other way but using a thread to let the timer tick.
Why do the timer not running independant or is there a one I don't know.
Thank you for you inspiration
|
|
|
|
|
|
i'v read about connection between Image List & Context Menu
one of the steps is to drag MenuImage to my form
but the problem i can't find it??
i tried to look in the Tools -> add Tools Box Item and
nothing was found there
i atteched link of the article maybe i didn't understood well the things.
http://www.codeproject.com/cs/menu/menuimage.asp[^]
|
|
|
|
|
|
My datagrid is bound to a database table. One of the table has the web addresses like , www.amazon.com etc etc. I want the users to display the hyperlink in the datagrid and not the value, so that the users can click on the hyperlink and go to the web address.
Thanks for the help.
|
|
|
|
|
Is this for the System.Web.UI.WebControls.DataGrid or System.Windows.Forms.DataGrid ? If it's the former, 1) there already is a column type for that (HyperLinkColumn ), and 2) your question belongs in the ASP.NET forum.
If it's the latter than you'll need to implement your own DataGridColumnStyle derivative class and add that to a DataGridTableStyle for your DataGrid . Read the documentation[^] for the DataGridTableStyle class to see how it's used with the DataGrid.TableStyles property. This explicitly defines a style (i.e., columns, their header text, width, etc.) which lets you add columns of a specific type.
See the documentation[^] for the DataGridColumnStyle for information - and an example using a DateTimePicker control - about implementing the class. There's also a few articles here on Code Project if you search for "DataGridColumnStyle", but, IMO, you'll find a better example in the .NET Framework SDK.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
hey, i need help. i'm writing the game go!fish in c laguage and if someone can help me with the algorithms i'll be thankful and if someone wrote a game in c laguage please contact me via my e-mail.
shalom
|
|
|
|
|
SMTK wrote:
i'm writing the game go!fish in c laguage and if someone can help me with the algorithms
1. Don't assume people know everything. I've never heard of go!fish. Describe the rules of the game.
2. Post this in the correct forum. This is the C# forum. I suggest you try the Visual C++ forum.
SMTK wrote:
please contact me via my e-mail
If you cannot be bothered to return to this forum to check for answers then maybe we cannot be bothered answering you. Also, people who provide advice here do so for free. Our "reward", if you like, is that we get to share the answers with the whole community, not just one individual.
Also, Code Project have a feature where by they will notify you by email of any responses to messages you've posted in the forum, use that to know you have an answer.
Do you want to know more?
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums Upcoming talk:
SELECT UserName, Password FROM Users
-- Getting unauthorised access to a SQL Server, and how to prevent it.
|
|
|
|
|
Hello, was wondering does the ArrayList has a way to determine the validity of the item (at compile time) to be placed into the container like C++ template? I know the type that the ArrayList could accept is object (which is everyone) but what if I need to be just integer instead?
Anyway?
thanks
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
|
thanks, can't wait to get my hands on the C# 2.0.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
What Corinna was saying about .NET 2.0 would be the List<> class. You can use that like so:
List<int> ints = new List<int>();
ints.Add(1);
ints.Add(2);
ints.Add("blah"); Besides using a generating you can currently extend CollectionBase , which uses an ArrayList internally. You define your methods to be typed according to the Type you want to accept.
Using this is a good way to produce more portable code. If you extend CollectionBase now, you can easily extend List<> later and just remove your CollectionBase overrides:
public class IntList : CollectionBase
{
public int Add(int value)
{
return List.Add(value);
}
public void DoSomething()
{
}
}
public class IntList : List<int>
{
public void DoSomething()
{
}
} See how easy that can be? Without changing your code that uses IntList you can change the base type and avoid boxing (since casting or treating a value type like int as a reference type object requires boxing).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
thanks
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hello, I have just acquainted myself with C# and .NET and I have a question. I see there are some C# classes that represent Crystal report files and report interfaces (*.rpt and *.xsd) and I want to find out how do these classes work.
Thank you.
|
|
|
|
|
.xsd is an XML schema file, first of all. You can use these to define fields for a report that you can later bind to a DataSet (disconnected recordset) using ReportDocument.SetDataSource .
Using Crystal Reports for Visual Studio .NET is documented in the product documentation. Read Crystal Reports[^] in MSDN online for more information.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi! All,
please help me to create Dynamic Cursor files at run time.
|
|
|
|
|
This request is well beyond the scope of this forum about writing in and using C#. If you want to create cursor files at runtime you need to understand the structure of a cursor blob (data), which is documented in the Platform SDK.
Read about Resources[^] in MSDN Online for information about the cursor data structures.
If you need help declaring such structures in C# and serializing them to a file stream, first read Marshaling Data with Platform Invoke[^] in the .NET Framework SDK. If you have further questions about how to do this in C# - if indeed you're trying to do this in C# - you can ask here.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|