D
DemonIT
Hi,
I am trying to set the status bar of my form to include the product
name and product version.
Here is my code:
Private Sub initStatusBar()
Dim sSBText as String = Application.ProductName & Space(3) &
"v" & Application.ProductVersion
sb.Text = sSBText
End Sub
When I run this I get:
An unhandled exception of type 'System.NullReferenceException'
occurred in system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
I cannot understand why - you cannot create an instance of the
Application class and nor should you have to, right?
Any ideas?
Thanks,
James.
P.S - It's definately the Application bit that is wrong - because this
produced the same error:
Dim Fullname As String = Application.ProductVersion.ToString
MsgBox(Fullname)
Also, where in Visual Studio do I change the Product Name and
Version?
Thanks.
I am trying to set the status bar of my form to include the product
name and product version.
Here is my code:
Private Sub initStatusBar()
Dim sSBText as String = Application.ProductName & Space(3) &
"v" & Application.ProductVersion
sb.Text = sSBText
End Sub
When I run this I get:
An unhandled exception of type 'System.NullReferenceException'
occurred in system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
I cannot understand why - you cannot create an instance of the
Application class and nor should you have to, right?
Any ideas?
Thanks,
James.
P.S - It's definately the Application bit that is wrong - because this
produced the same error:
Dim Fullname As String = Application.ProductVersion.ToString
MsgBox(Fullname)
Also, where in Visual Studio do I change the Product Name and
Version?
Thanks.