sunil

sunil

  • NA
  • 47
  • 0

calling a function instead of form in VB.Net(c#)

Apr 8 2005 4:12 AM
I have a sample code below. I am executing this line of code which will call the form. (see this line code in sample below - Application.Run(new DataExportForm());). But i don't want to open the form. Instead i want to execute a function by name 'Export_Data()'.(this function also specified in the code). Can anybody help me out by providing a sample code to run the function. Please change the same set of code and post reply. Thanks. namespace MM.OutlookConnector { public class DataExportForm : System.Windows.Forms.Form { // private System.Windows.Forms.DataGrid dg1; public DataExportForm() { InitializeComponent(); } private void InitializeComponent() { this.Name = "DataExportForm"; } [STAThread] static void Main() { Application.Run(new DataExportForm()); //Export_Data(); } private void Export_Data() { string ExportFlag = "Yes"; } } }

Answers (2)