[RESOLVED] How to access Windows Form Designer generated code in 2008?
Is it possible to edit the Windows Form Designer generated code in VS2008?
Re: How to access Windows Form Designer generated code in 2008?
Open the Solution Explorer and click the Show All Files button. You can then expand your for to reveal a node for the designer code file.
Re: How to access Windows Form Designer generated code in 2008?
Is the Windows Form Designer code in the .resx file? And can I add code such as this?
Code:
Private Shared _instanceTransaction As frmTransaction
Public Shared ReadOnly Property Instance() As frmTransaction
Get
If _instanceTransaction Is Nothing OrElse _instanceTransaction.IsDisposed Then
'There is no current instance so create one.
_instanceTransaction = New frmTransaction
End If
'Return a reference to the one and only instance.
Return _instanceTransaction
End Get
End Property
Re: How to access Windows Form Designer generated code in 2008?
The designer code would be in the one with "designer" in the name.
You shouldn't be touching the designer code file at all unless you specifically need to, which is generally only when something has gone awry. If all you want to do is add a property then that is not designer code; it's user code so it belongs in the user code file, i.e. the code file that you (the user) normally add and edit code in. Why should this particular property be any different?
Re: How to access Windows Form Designer generated code in 2008?