Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
VB.NET
'Inherits problems ?
  Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim form10 As New Form()

'use Inherits here for form10 

        Dim but As New Button
        but.Text = "Reply me "
        form10.Controls.Add(but)
        form10.ShowDialog()
    End Sub


What I have tried:

'Inherits problems i got no idea how to 'Inherits in this ?
Posted
Updated 6-Jul-16 20:05pm
Comments
Dave Kreskowiak 6-Jul-16 8:38am    
Your question makes no sense. Classes and Interfaces inherit from other classes and interfaces.

Methods do not inherit anything.

Users do not "inherit" anything either.

Perhaps a description of what you're trying to do with this might help?
Member 10974007 6-Jul-16 8:58am    
well am trying to use feel and look from form1
by inherits methord

"well am trying to use feel and look from form1
by inherits methord"

Well, you don't do it like that - you do it by deriving your form from Form1 instead of the basic Form class using Inherits: How to: Inherit Windows Forms[^] explains what it is all about.
 
Share this answer
 
Comments
Maciej Los 7-Jul-16 1:58am    
5!
Well, we have no idea what you mean by saying: "how to 'Inherits in this"...

I'd suggest to get back to basics:
Windows Forms Visual Inheritance[^]
Inheritance from a Base Class in Microsoft .NET[^]
Inheritance in Visual Basic[^]
When to Use Inheritance[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900