<イベント処理>
protected override void OnKeyDown(System.Windows.Forms.KeyEventArgs e)
{
// Enterキーの場合
if (e.KeyCode == Keys.Enter)
{
// タブ移動
if (CmnFunc.MoveNext(this, e.KeyData))
return;
}
base.OnKeyDown(e);
}
<呼び出しメソッド>
class CmnFunc
{
public static bool MoveNext(Control c, Keys keyData)
{
bool bResult = false;
// Enterキーで次のコントロールに移動
if (keyData == Keys.Enter)
{
bResult = c.FindForm().SelectNextControl(c, true, true, true, true);
}
if (keyData == (Keys.Enter | Keys.Shift))
{
bResult = c.FindForm().SelectNextControl(c, false, true, true, true);
}
return bResult;
}
}
<ソース>
public static int GetByteLength(string s)
{
return System.Text.Encoding.GetEncoding("Shift_Jis").GetByteCount(s);
}
>・・・makecert.exe -n "CN=eisan001588" -r -sv eisan001588-root.pvk eisan001588-root.cer Succeededダイアログが表示されるので、パスワードを入力する。 カレントフォルダに2つのファイルが出来上がる。
>・・・pvk2pfx.exe -pvk eisan001588-root.pvk -spc eisan001588-root.cer -pfx eisan001588-root.pfx -f -pi (パスワード)・eisan001588-root.pfx