Autofreak
asked on
debugger
Hello Guys,
I am little confused here and need you help. See example below. I am invoking a Form2 instance AccRequestForm from a main form's menu bar. AccRequestForm is shown and has a button event button1_Click that is supposed to execute method myAccount(). Actually, it does and I see the message box but I don't see the yellow debugging line explicetly going to the method, it just shows the result of the method. I would like to see the debugger passing over control to the method so I could monitor each code line. Perhaps it has to do with how I activated AccRequestForm? It come on top of the main form when shown and stays there after the button is clicked. Probabbly I should deactivate or hide it on Click event? Where and how do I do that?
Thanks a lot,
Serge
private void reconciliationReportToolSt ripMenuIte m_Click(ob ject sender, EventArgs e)
{
Form2 AccRequestForm = new Form2();
AccRequestForm.Activate();
AccRequestForm.Show();
}
System;
using System.Collections.Generic ;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form2 : Form
{
int IOAccount;
public Form2()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
myAccount();
}
private void myAccount()
{
int ll = 10;
MessageBox.Show("My Number is" + ll +IOAccount);
}
}
}
I am little confused here and need you help. See example below. I am invoking a Form2 instance AccRequestForm from a main form's menu bar. AccRequestForm is shown and has a button event button1_Click that is supposed to execute method myAccount(). Actually, it does and I see the message box but I don't see the yellow debugging line explicetly going to the method, it just shows the result of the method. I would like to see the debugger passing over control to the method so I could monitor each code line. Perhaps it has to do with how I activated AccRequestForm? It come on top of the main form when shown and stays there after the button is clicked. Probabbly I should deactivate or hide it on Click event? Where and how do I do that?
Thanks a lot,
Serge
private void reconciliationReportToolSt
{
Form2 AccRequestForm = new Form2();
AccRequestForm.Activate();
AccRequestForm.Show();
}
System;
using System.Collections.Generic
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form2 : Form
{
int IOAccount;
public Form2()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
myAccount();
}
private void myAccount()
{
int ll = 10;
MessageBox.Show("My Number is" + ll +IOAccount);
}
}
}
Are you currently stepping through the code or have you set a breakpoint inside the myAccount() method ?
ASKER
I put a breaking point inside button1_Click event and after I press F10 on myAccount() line the yellow line never goes to the method's body but hangs for a split sec and shows the message window.
Serge
Serge
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.