Click here to Skip to main content
15,887,302 members
Home / Discussions / C#
   

C#

 
AnswerRe: Problem of A generic error occurred in GDI+. Pin
Mark Salsbery7-Oct-08 3:58
Mark Salsbery7-Oct-08 3:58 
QuestionFailure Of Exe- Error: Cannot load Interop.Excel.1.5.0.0.dll file Pin
DJ2457-Oct-08 1:20
DJ2457-Oct-08 1:20 
AnswerRe: Failure Of Exe- Error: Cannot load Interop.Excel.1.5.0.0.dll file Pin
Giorgi Dalakishvili7-Oct-08 1:32
mentorGiorgi Dalakishvili7-Oct-08 1:32 
GeneralRe: Failure Of Exe- Error: Cannot load Interop.Excel.1.5.0.0.dll file Pin
DJ2457-Oct-08 1:36
DJ2457-Oct-08 1:36 
GeneralRe: Failure Of Exe- Error: Cannot load Interop.Excel.1.5.0.0.dll file Pin
Giorgi Dalakishvili7-Oct-08 1:44
mentorGiorgi Dalakishvili7-Oct-08 1:44 
QuestionCopy treeNodeCollection problem Pin
sepel7-Oct-08 0:11
sepel7-Oct-08 0:11 
AnswerRe: Copy treeNodeCollection problem Pin
Eduard Keilholz7-Oct-08 0:27
Eduard Keilholz7-Oct-08 0:27 
AnswerRe: Copy treeNodeCollection problem Pin
DaveyM697-Oct-08 1:09
professionalDaveyM697-Oct-08 1:09 
A node can't exist in two treevies at once. Each node has to be cloned first so some sort of loop is inevitable. Two code snippets below. The first does what you want but with a loop. The second moves the nodes rather than copies but no loop required.
// Copies the nodes
if (treeView1.Nodes.Count > 0)
{
    TreeNodeCollection treeNodes = treeView1.Nodes;
    TreeNode[] nodearray = new TreeNode[treeNodes.Count];
    for (int i = 0; i < nodearray.Length; i++)
    {
        nodearray[i] = (TreeNode)treeNodes[i].Clone();
    }
    treeView2.Nodes.AddRange(nodearray);
}

//Moves the nodes
if (treeView1.Nodes.Count > 0)
{
    TreeNodeCollection treeNodes = treeView1.Nodes;
    TreeNode[] nodearray = new TreeNode[treeNodes.Count];
    treeNodes.CopyTo(nodearray, 0);
    //Clear the original tree as nodes can't exist in both
    treeView1.Nodes.Clear();
    treeView2.Nodes.AddRange(nodearray);
}


Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

GeneralRe: Copy treeNodeCollection problem Pin
sepel7-Oct-08 7:30
sepel7-Oct-08 7:30 
Questionhow to monitor WCF/web services traffic? Pin
George_George6-Oct-08 23:42
George_George6-Oct-08 23:42 
AnswerRe: how to monitor WCF/web services traffic? Pin
blackjack21507-Oct-08 2:42
blackjack21507-Oct-08 2:42 
GeneralRe: how to monitor WCF/web services traffic? Pin
George_George7-Oct-08 21:41
George_George7-Oct-08 21:41 
QuestionSmart device screen resolution Pin
Scalpa6-Oct-08 22:17
Scalpa6-Oct-08 22:17 
QuestionCreate HeaderFooter object in Word using C# Pin
Harish (Developer)6-Oct-08 21:14
Harish (Developer)6-Oct-08 21:14 
AnswerRe: Create HeaderFooter object in Word using C# Pin
dan!sh 6-Oct-08 23:46
professional dan!sh 6-Oct-08 23:46 
GeneralRe: Create HeaderFooter object in Word using C# Pin
Harish (Developer)7-Oct-08 2:13
Harish (Developer)7-Oct-08 2:13 
Questionpaging list(horizontal) control Pin
Member 39813666-Oct-08 21:03
Member 39813666-Oct-08 21:03 
QuestionRead HTML file and replace relative path of images with absolute Pin
DJ2456-Oct-08 20:43
DJ2456-Oct-08 20:43 
AnswerRe: Read HTML file and replace relative path of images with absolute Pin
Guffa6-Oct-08 23:02
Guffa6-Oct-08 23:02 
QuestionBuild installer for C# application Pin
Ethen6-Oct-08 19:53
Ethen6-Oct-08 19:53 
AnswerRe: Build installer for C# application Pin
Eduard Keilholz7-Oct-08 0:20
Eduard Keilholz7-Oct-08 0:20 
Questioncommunicate with linux server from .net application in windows Pin
kvPriya6-Oct-08 19:42
kvPriya6-Oct-08 19:42 
QuestionHow to get SharePoint List Actual url Pin
manju#1236-Oct-08 19:24
manju#1236-Oct-08 19:24 
QuestionDocking property of Datable for pda's Pin
sailesh_gupta6-Oct-08 18:49
sailesh_gupta6-Oct-08 18:49 
QuestionImplement an interface in my form Pin
Kevin Marois6-Oct-08 15:24
professionalKevin Marois6-Oct-08 15:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.