For a TabControl, how do I make the tabs on the tab pages appear on the bottom instead of on the right
Set the TabControl.Alignment property to TabAlignment.Bottom. tabControl1.Alignment = TabAlignment.Bottom; You can also change the tabs into buttons using the Appearance property and TabAppearance enums.
When I call ListViewItem.Selected = true;, why doesn’t the item get selected
Make sure the ListView has focus when you set the Selected property. For example, if this code is in the click handler for a button, this button will have the focus, and the selection in the list will fail. Just set the focus back to the list before you set the Selected property.
How can I convert the string ‘Red’ into the color Color.Red, and vice versa
You can use the TypeDescriptor class to handle this. Color redColor = (Color)TypeDescriptor.GetConverter(typeof(Color)).ConvertFromString(‘Red’); string redString = TypeDescriptor.GetConverter(typeof(Color)).ConvertToString(Color.Red); You can also use code such as System.Drawing.ColorConverter ccv = new System.Drawing.ColorConverter(); this.BackColor = (Color) ccv.ConvertFromString(‘Red’);
How do I change the cursor for a control
Try button1.Cursor = new System.Windows.Forms.Cursor(@’C:\winnt\cursors\hnodrop.cur’);
How do I do XOR-type-drawing (SetROP2-Function in MFC) in GDI+
GDI+ doesn’t support ROP codes like XOR. To use XOR drawing mode, interop with GDI.