code to open form from toolstrip, same code yet among one code cannot do '.show();'

46 views Asked by At
    private void userToolStripMenuItem_Click(object sender, EventArgs e)
    {
        frUser user = new frUser();
        user.Show();
    }


    private void categoryToolStripMenuItem_Click(object sender, EventArgs e)
    {
        frCategory category = new frCategory();
        category.Show();
            

hi, why i can open user form using this code yet cannot do for category? when i put 'category.' the suggestion didnt show up 'Show' and when i manually do this, the code is not being recognized by vs.

this is a code at a main form to open subform using tool stripbar.

thank you

1

There are 1 answers

0
Gambi On BEST ANSWER

The Show() method is part of the System.Windows.Forms.Form class. Your frCategory class must inherit from System.Windows.Forms.Form.