C
cj
In a project done in 2003 about a year ago I was told to add the
SocketWrench code below into the Windows Form Designer generated code
area as shown below.
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
socket = New SocketWrenchCtl.SocketWrench
If socket.Initialize("ELMO") <> 0 Then
Throw New System.Exception("Unable to initialize control")
End If
End Sub
I'm completing a 2005 program now that was so similar I copied many
parts of the old 2003 program but I'm not sure what to do with this
code. I know 2005 keeps the Windows Form Designer generated code
somewhere but I really don't want to add it there unless it is really
necessary. Apparently it can go in Form1_Load but I'm not sure that's
appropriate. Where should I put it in 2005? Pros and cons?
SocketWrench code below into the Windows Form Designer generated code
area as shown below.
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
socket = New SocketWrenchCtl.SocketWrench
If socket.Initialize("ELMO") <> 0 Then
Throw New System.Exception("Unable to initialize control")
End If
End Sub
I'm completing a 2005 program now that was so similar I copied many
parts of the old 2003 program but I'm not sure what to do with this
code. I know 2005 keeps the Windows Form Designer generated code
somewhere but I really don't want to add it there unless it is really
necessary. Apparently it can go in Form1_Load but I'm not sure that's
appropriate. Where should I put it in 2005? Pros and cons?