Tag: WinForms

Handle arrow key events in Windows Forms .Net (C#)

Handle arrow key events in Windows Forms .Net (C#)

Pressing of a key is detected and handled in Windows Form using KeyPress, KeyDown or similar events. But these events does not fire when arrow keys are pressed. One way to get around it is to set KeyPreview as true for your Form. In many cases, this also doesn’t work, for instance, when you have…

Read More Read More

Loading and Saving a TreeView control to an XML file using XmlTextWriter and XmlTextReader

Loading and Saving a TreeView control to an XML file using XmlTextWriter and XmlTextReader

Follow the below link to see my article at CodeProject with source code. http://www.codeproject.com/KB/cpp/TreeView_Serializer.aspx It demonstrates how to serialize and de-serialize the contents of System.Windows.Forms.TreeView control from an XML file using forward only, non-cached XmlTextReader and XmlTextWriter.