Hello,
I'm about to start working my way through a two O'Reilly books; Learning Visual Basic .NET and Programming .NET Windows Applications. I was playing with the latter this afternoon using the new VB Express Beta 2. The following code I could not get to work and I think it is something to do with the difference between .NET 1 and 2. The book examples are in .NET 1.
Imports System.Windows.Forms Namespace ProgrammingWinForms Public Class HelloWorld Public Sub New() Shared Sub Main() End Namespace |
When run, the form shown still has the title "Form1." If I add a title through the form designer it adds a new routine:
Private Sub InitializeComponent() Me.SuspendLayout() ' 'HelloWorld ' Me.ClientSize = New System.Drawing.Size(292, 266) Me.Name = "HelloWorld" Me.Text = "Test Title" Me.ResumeLayout(False) End Sub |
Could someone explain why the code the editor adds works
Thanks for any help,

Trouble with Forms
AllenD
the InitializeComponent() Method is used by the WinForms Designer and added him even to .net 1.0 projects :)
Where is Text declared in your first Code-Sample
Caioshin
Thanks for your reply. The code example I left was incorrect. Sorry about that.
Slightly different question; is vbc.exe included in the VB Express / .NET 2 download I can't find it on my system and I can't see a way in the IDE to build just single *.vb files.
Thanks for any help.
hadstj
Adeze
Check out the \windows\Microsoft.NET\Framework\ ....