Celine Ilano

Celine Ilano

  • NA
  • 4
  • 4k

Constructor takes 0 arguments

May 27 2014 10:20 AM
namespace Patient_Information_System
{
    public partial class Doctors : Form
    {
       


        public Doctors()
        {
            InitializeComponent();
        }


        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            Main f2 = new Main();
            f2.ShowDialog();
        }
    }
}

I get the error there. 
Here is my main code.

namespace Patient_Information_System
{
    public partial class Main : Form
    {
       
        public Main(string UserName)
        {          
            InitializeComponent();
            label11.Text = UserName;
            toolStripStatusLabel2.Text = UserName;
            timer1.Start();
            load_usertbl();
        }

I cant seem to fix it :/ Ive tried placing the username string outside the main part. 


Answers (5)