I am working on a very complex project and I am very very new to the windows Project.
I have 2 Forms :
ViewSchedule.cs
Sch
You need to create public properties in the dialog form and set these properties before showing the dialog.
Then onLoad use these property values.
In form2 add these date properties:
public partial class Form2 : Form
{
public DateTime Date1 { get; set; }
public DateTime Date2 { get; set; }
public Form2()
{
InitializeComponent();
}
}
And from form1 access these as follows:
private void Form1_Load(object sender, EventArgs e)
{
Form2 frm2 = new Form2();
frm2.Date1 = DateTime.Now;
frm2.Date2 = DateTime.Now;
frm2.ShowDialog();
}