Diskuze: Form focus
Zobrazeno 4 zpráv z 4.
//= Settings::TRACKING_CODE_B ?> //= Settings::TRACKING_CODE ?>
Můžeš zrušit tab index u buttonu, mně se to nikdy nestalo, když sem dáš kód, zkusím ti poradit v čem máš chybu.
Ok. Toto je kód:
namespace WindowsFormsApplication19
{
public partial class Form1 : Form
{
Button QuitTesting = new Button();
public Form1()
{
InitializeComponent();
QuitTesting.Text = "Ukoncit test";
QuitTesting.Location = new System.Drawing.Point(186, 367);
QuitTesting.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
QuitTesting.Size = new Size(141, 36);
Controls.Add(QuitTesting);
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
MessageBox.Show("aja", "aja", MessageBoxButtons.OK,MessageBoxIcon.Information);
}
}
}
V nom ale chyba nie je. A díky. Vyriešil som to. Akurát nie tab indexom ale tabstopom.
QuitTesting.TabStop = false;
Celý kod pre prípad, že by to niekto potreboval:
namespace WindowsFormsApplication19
{
public partial class Form1 : Form
{
Button QuitTesting = new Button();
public Form1()
{
InitializeComponent();
QuitTesting.Text = "Ukoncit test";
QuitTesting.Location = new System.Drawing.Point(186, 367);
QuitTesting.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
QuitTesting.Size = new Size(141, 36);
QuitTesting.TabStop = false;
Controls.Add(QuitTesting);
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
MessageBox.Show("aja", "aja", MessageBoxButtons.OK,MessageBoxIcon.Information);
}
}
}
Ďakujem veľmi pekne
pravda je že jsem si jméno přesně nepamatoval
Zobrazeno 4 zpráv z 4.