-3
イム:フォーカスを取得/維持するテキストボックスとボタンを選択|この絵のようにフォーカスを取得しようとしているC#の
[ -
だから私は、選択したテキストボックスを持っているし、[Accept]ボタンにフォーカスaswell
private void frm_redimensionar_Load(object sender, EventArgs e)
{
if (frm_MonoPaint.Exporto == " ")
{
num_amplada.Value = 32;
num_alcada.Value = 32;
}
num_amplada.Focus(); //
bttn_enviar.Focus(); //
}
private void bttn_cancelar_Click(object sender, EventArgs e)
{
Close();
}
private void bttn_enviar_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
Close();
}
public int redAlcada()
{
return Convert.ToInt32(num_alcada.Value);
}
public int redAmplada()
{
return Convert.ToInt32(num_amplada.Value);
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Escape)
{
this.Close();
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
を持ちながら、それを書くことができます
コード内で行ったことを表示する必要があります。もしあなたが試したことがあれば 'SaveDialog'を使用していますか? – MethodMan
OKを返すテキストボックスとボタン付きのちょうど新しいフォーム –
ありますウェブ上の例についてはフィルタなどについて.. C#SaveDialog – MethodMan