Quantcast
Channel: SQL Server Setup & Upgrade forum
Viewing all articles
Browse latest Browse all 5760

Error:Object Reference not set to an instance of object.

$
0
0

Hi,

       In my project, I have to move form2 when I click a button in form1. After that in form2 there is 5 tabs. Each tab contains 25 buttons. When I click any of this button it will go to another form named test. I created exe of this. But in exe, when I click any of the button among these 25, It will show the following error.

Error:Object Reference not set to an instance of object.

I think it is because of 'null'. But I don't know how to solve this. The below given code is used in button click. Error occurring in this area.

       private void button4_Click_1(object sender, EventArgs e)
        {
            nm = button4.Text;
            this.Hide();
            Test t = new Test();
            t.ShowDialog(this.Owner);
            this.Close();
        }

Can anyone help me??


Viewing all articles
Browse latest Browse all 5760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>