working in conversion of vs2003,custom control programming . i want to upgrade that to vs2005,.net compact framework 2.0.
This is the following code which is written in vs 2003, i want to convert that to 2005 . i want to know how to write the design time support and metadata assembly.
using System.Windows.Forms;
[assembly: System.CF.Design.RuntimeAssemblyAttribute("SmartCheckbox,Version=1.0.2.0,Culture=neutral,PublicKeyToken=null")]
/// SmartCheckbox is a derivative of the CheckBox control. The minus and enter keys can each be
/// used to check or uncheck the control. This is useful when we don't have a plus or space key
public class SmartCheckbox : System.Windows.Forms.CheckBox
private static Font _defaultFont = new Font("Arial",
8.25f, System.Drawing.FontStyle.Regular);
public override System.Drawing.Font Font
base.Font = _defaultFont;
//if ( value == System.Windows.Forms.Control.DefaultFont )
// base.Font = _defaultFont;
/// Handles Keypad input. Uses the minus and Enter keys to toggle the checkbox on/off.
/// <param name="e"></param>
protected override void OnKeyDown(System.Windows.Forms.KeyEventArgs e)
if ( e.KeyCode == Keys.Enter ||
e.KeyCode == Keys.Subtract || // This is KeyValue 109. Keypad sends 189.
e.KeyValue == 189 ) // Keys.OemMinus (Frikkin enum not supported by CF!!!)
protected override void OnKeyUp(KeyEventArgs e)
protected override void OnKeyPress(KeyPressEventArgs e)
if ( e.KeyChar == (char)45 || // ASCII '-' (This is what gets caught in PocketAE)
e.KeyChar == (char)26 ) // ASCII 'SUB'