E
Emre Sevinc
Hello,
I have a strange situation. I create a very simple Windows Forms
application and place the code below however even though I place
breakpoints in various event handling points VS.NET 2005 only enters
the breakpoint for the button but not for the form. Am I missing
something? Why don't the events for my form Form1 have any effect?
Form1.cs:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace GeciciResize
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void Form1_Resize(object sender, System.EventArgs e)
{
// I place a breakpoint in the line below BUT it doesn't
enter here when I resize the form.
if (FormWindowState.Minimized == WindowState)
Form1.ActiveForm.Hide();
}
private void Form1_Click(object sender, System.EventArgs e)
{
// I place a breakpoint in the line below BUT it doesn't
enter here when I click on the form.
if (FormWindowState.Minimized == WindowState)
Form1.ActiveForm.Hide();
}
private void Form1_DoubleClick(object sender, System.EventArgs
e)
{
// I place a breakpoint in the line below BUT it doesn't
enter here when I double click on the form.
if (FormWindowState.Minimized == WindowState)
Form1.ActiveForm.Hide();
}
private void button1_Click(object sender, EventArgs e)
{
// I place a breakpoint in the line below AND it enters
here when I click on the button.
Form1.ActiveForm.Hide();
}
}
}
Regards,
Emre Sevinc
I have a strange situation. I create a very simple Windows Forms
application and place the code below however even though I place
breakpoints in various event handling points VS.NET 2005 only enters
the breakpoint for the button but not for the form. Am I missing
something? Why don't the events for my form Form1 have any effect?
Form1.cs:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace GeciciResize
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void Form1_Resize(object sender, System.EventArgs e)
{
// I place a breakpoint in the line below BUT it doesn't
enter here when I resize the form.
if (FormWindowState.Minimized == WindowState)
Form1.ActiveForm.Hide();
}
private void Form1_Click(object sender, System.EventArgs e)
{
// I place a breakpoint in the line below BUT it doesn't
enter here when I click on the form.
if (FormWindowState.Minimized == WindowState)
Form1.ActiveForm.Hide();
}
private void Form1_DoubleClick(object sender, System.EventArgs
e)
{
// I place a breakpoint in the line below BUT it doesn't
enter here when I double click on the form.
if (FormWindowState.Minimized == WindowState)
Form1.ActiveForm.Hide();
}
private void button1_Click(object sender, EventArgs e)
{
// I place a breakpoint in the line below AND it enters
here when I click on the button.
Form1.ActiveForm.Hide();
}
}
}
Regards,
Emre Sevinc