Saturday, 24 August 2013

Integrating a windows form in OutLookAddIn project and calling the OutLookAddIn class form winform?

Integrating a windows form in OutLookAddIn project and calling the
OutLookAddIn class form winform?

Im working on a OutLookAddIn Project and for a particualr scenario i added
a winform to the outllookaddin project, so when the user first loads the
project the winform opens up...After entering his UserId and Password and
clicking the submit button i want to call a method that is in the class
'ThisAddIn' but im not able to access the method from windows form class,
im getting the error as ''OutlookAddIn1.ThisAddIn' does not contain a
constructor that takes 0 arguments''....how can i get rid of this...just
posting some sample ode below
public partial class ThisAddIn
{
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
}
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
}
public void Validate()
{
MessageBox.Show("Success");
}
}
My Winform class from where i want to access the method 'Validate'
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
}
}
In the button1_Click event i want t0 access the method validate, so need
some advice from experts here..

No comments:

Post a Comment