Question about missing inheirts Statment

Mr Bean

Member
Joined
Feb 5, 2008
Messages
5
Programming Experience
Beginner
Hello not sure if this is the correct place to put this. if it is the wrong place sorry about it mods

I am just learning Visual Basic.NET 2003 form Sams Teach Yourself in 21 days i am using Microsoft Visual Studio 2005 IDE

the point of this thread is in the book it says when i double click on a button on the form i should have following lines of code

Public Class Form 1
Inherits System.Windows.Forms.Form

'Windows Form Designer generated code

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = "Hello there!"
End Sub
End Class

but when i double click and go into code view all i have is the following

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = "Hello there!"
End Sub
End Class

If any one could shed some light on why this is happening would be great the programs still run. just want to check and see if i am doing any thing wrong
 
You're using 2005, but reading a 2003 book.

That's how its supposed to look in 2005. The Inherits and Generated code are in another file. 2.0 has Partial classes.
 
You're using 2005, but reading a 2003 book.

That's how its supposed to look in 2005. The Inherits and Generated code are in another file. 2.0 has Partial classes.


ok cheers reason for using 2005 and 2003 book a mate had a free copy of 2005 so seemed ok to use it .
 
Back
Top