How do I add an XmlNode from one XmlDocument to an XmlNode in another XmlDocument?
The XmlNode.AppendChild restricts you to add XmlNodes originated in the same XmlDocument. So, to do the above, here is a sample workaround: [C#] // destParent and sourceParent are from different XmlDocuments. // This method will append the children of sourceParent to the destParent’s children. public static void TransferChildren(XmlDocument destDoc, XmlNode destParent, XmlNode sourceParent) { // Create a temporary element into which we will add the children. XmlElement tempElem = destDoc.CreateElement(‘Temp’); tempElem.InnerXml = sourceParent.InnerXml; foreach(XmlNode node in tempElem.ChildNodes) destParent.AppendChild(node); } [VB.Net] ’ destParent and sourceParent are from different XmlDocuments. ’ This method will append the children of sourceParent to the destParent’s children. Public Static Sub TransferChildren(ByVal destDoc As XmlDocument, ByVal destParent As XmlNode, ByVal sourceParent As XmlNode) ’ Create a temporary element into which we will add the children. Dim tempElem As XmlElement = destDoc.CreateElement(‘Temp’) tempElem.InnerXml = sourceParent.InnerXml Dim node As XmlNode For Each node In tempElem.ChildNodes destParent.AppendChild(node) Next End Sub
Are there any libraries to do numerical analysis with .NET
You can get more information on numerical analysis using .NET languages at this site: http://www.centerspace.net/resources.php.
How do I prevent my Component from becoming visible in the VS.Net Toolbox?
Use the ToolboxItem(false) attribute on your Component/Control class. This will prevent it from appearing in the Toolbox. [ToolboxItem(false)] public class MyComponent : Component{..}
How can I get the screen resolution of my display
Use this property: System.Windows.Forms.Screen.PrimaryScreen.Bounds
How can I listen for certain keys at the Form level irrespective of which Control has the focus?
When the Form.KeyPreview property is set to true, the Form’s KeyPress, KeyDown and KeyUp events will be fired even before the Control with the focus’ corresponding events. You may choose to forward these message to the Control after processing them in the Form’s event handlers (this happens by default) or set the e.Handled property to true (in the event argument) to prevent the message from being sent to the Control with focus.