.NETメモ

class TextBoxEx : TextBox {

  protected override bool ProcessDialogKey(Keys keyData) {
    if (keyData == Keys.Enter) {
      return true;
    }

    return base.ProcessDialogKey(keyData);
  }
}



KeyPressイベントでEnter押下のときにe.Handled=True



String型の文字列をSJISのByte[]に変換

Encoding.GetEncoding(932).GetBytes( "foo");