Inherited Form Question

  • Thread starter Thread starter Amit D.Shinde
  • Start date Start date
A

Amit D.Shinde

I am having Form1 in my application having controls
Button1,textbox1,button2

and Form2 is inherited form of Form1
In this form2 i have its own controls Button3.
Now when I run my Program I don't want to see Button2 of Form1.
i.e My form2 should contain Button1 Textbox1 and Button3 only.
Please Help Me

Amit D Shinde
 
Amit D.Shinde said:
I am having Form1 in my application having controls
Button1,textbox1,button2

and Form2 is inherited form of Form1
In this form2 i have its own controls Button3.
Now when I run my Program I don't want to see Button2 of Form1.
i.e My form2 should contain Button1 Textbox1 and Button3 only.

If you don't need button2 in Form2 at all, inheritance is perhaps not the
right way (but it can be). To hide button2, set button2.visible = false in
the constructor of Form2 or in OnLoad.
 
Amit D.Shinde said:
I am having Form1 in my application having controls
Button1,textbox1,button2

and Form2 is inherited form of Form1
In this form2 i have its own controls Button3.
Now when I run my Program I don't want to see Button2
of Form1. i.e My form2 should contain Button1 Textbox1
and Button3 only.

Set its 'Visible' property to 'False'.
 
Back
Top