|
|
Thanks for the response. I am doing this project with the Compact framework.
I am not sure how this will help me set the Control Panel -> Regional Settings for different Languages->Cultures using C#/C++.
I Would also be ok with finding a DLL that I could connect to, to use some method within that would help me set the regional values.
|
|
|
|
|
i have an IP and i want to change it to host name
how is that??
thanks allot
|
|
|
|
|
In your help look up Dns.GetHostEntry().
Phil
|
|
|
|
|
GetHostEntry Resolves a host name or IP address to an IPHostEntry instance.
but i have an IP as a string and i need to resolve it to host name as a string too.
thanks allot
|
|
|
|
|
Dns.GetHostByAddress("127.0.0.1").HostName
Hope this help.
Neo
|
|
|
|
|
thanks allot. it works
best regards.
|
|
|
|
|
Hi,
when i run this code i get a null-reference exception at the last line of code. I don't know why this happens, because i first add the node and it IS there. I looked in the debugger.
Does someone know a solution?
<code>
foreach (DateTime d in daten)
{
if (treeView1.Nodes.Find(d.Month.ToString(), false) != null)
{
treeView1.Nodes.Add(new TreeNode(d.Month.ToString()));
}
treeView1.Nodes[d.Month.ToString()].Nodes.Add(new TreeNode(d.Date.ToShortDateString()));
}
</code>
|
|
|
|
|
It will be easier to see what's going on if you break out that last line of code as follows:
TreeNode node = treeView1.Nodes[d.Month.ToString()];
TreeNode newNode = new TreeNode(d.Date.ToShortDateString());
node.Nodes.Add(newNode);
This will allow you to check state as you step though in debug mode. When you put so much into a single line, it can be much less obvious what is breaking.
|
|
|
|
|
if d is null from daten then d.Month will fail;
Also, treeView1.Notes[someString] may return null as well but it is most likely the d;
File Not Found
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: but it is most likely the d
Not so very likely... The variable d is a DateTime structure, and can't be null.
---
single minded; short sighted; long gone;
|
|
|
|
|
Since daten is not defined in could very well be a non-generic 1.1 .NET collection such as an array list which are collections of objects. Iterating on such a structure would attempt to assign null giving the null reference exception. Below is written in 2.0 but uses the 1.1 collection ArrayList.
<br />
ArrayList list = new ArrayList();<br />
list.Add(DateTime.Now);<br />
list.Add(null);<br />
foreach(DateTime d in list) {<br />
MessageBox.Show(d.ToShortDateString());<br />
}<br />
File Not Found
|
|
|
|
|
No, it couldn't. If the daten collection would contain something other than DateTime values, the error would appear when the value is put in the d variable, not when the d variable is later used.
---
single minded; short sighted; long gone;
|
|
|
|
|
Perhaps but when a question is posed so vague as to say where is my null reference exception i think any little bit of help will help.
Now you are correct in that when I said d.Month I was wrong. Sometimes I say the stupidest things. Of course, that could also fall into the category of someone designing an OO language that doesn't fully support nulls until the third release.
File Not Found
|
|
|
|
|
Can anyone tell me how to use this control? Help me please...
public ListViewItem ( string[] items , System.Int32 imageIndex , System.Drawing.Color foreColor , System.Drawing.Color backColor , System.Drawing.Font font )
|
|
|
|
|
You'll really need to ask a more specific question. The ListView control can be used lots of ways. What exactly are you trying to do?
Also, have you tried reading the ?
documentation on MSDN[^]
|
|
|
|
|
I want to do drag and drop in list view.But from what i seen, drag and drop can be done for string only. Can we do drag and drop other than string?
|
|
|
|
|
shamsteady wrote: from what i seen, drag and drop can be done for string only
I'm not sure what you mean. ListView controls don't contain strings, they contain ListViewItem objects.
It is fairly simple to implement Drag/Drop behavior in a ListView. You'll need to create a new control that inherits from ListView, then override the drag/drop event handlers. This article[^]appears to explain it (I didn't read it myself...).
Good luck.
|
|
|
|
|
|
Hi,
I am wondering how one can activate a flash or a Real player from C# should we use the ActiveX layer or generate html verbose from the app and how.
Thanks for any guidance.
Mike.
If you dont know were you are,look back were you come from. (Some time one dont know how far they travelled) Next time before you complain ! Give a friendly look to your sole. (African Wisdom).
|
|
|
|
|
Hi,
How to handle errors in SMTP class using .Net.Like if it the mail bounces back how to get that message.though using catch block i can handle general exceptions while sending Mail.i need to check the type of exception like if the recipient's mail box is full(The mail would typically bounce back - how to get these type of exceptions). And i have to check if the SMTP sever is not down before sending mail.I am using .Net framework 1.1(version 2003)
-- modified at 12:39 Thursday 8th March, 2007
people laugh at me because they say im different and I laugh at them because they are all the same.
|
|
|
|
|
I want to edit subitem in listview, I already use labeledit=true, but it only can edit in subitem[0] or I misunderstand about labeledit. I want to edit every field in listview. Thankyou
|
|
|
|
|
Are you wanting to edit the items programmatically or through the UI?
Setting the LabelEdit property to 'true' allows the user to edit the text of the items in the list.
|
|
|
|
|
I want to edit by UI
I already set LabelEdit to 'true' but it only allow me to edit the text of the items on the first.
|
|
|
|
|
Did you subclass ListView? Or are you just using the ListView class?
|
|
|
|