app is a type in forms

  • Thread starter Thread starter Larry
  • Start date Start date
L

Larry

I have the following code:

Dim abc As New AboutBox.clsAbout
abc.ClientApp = System.Windows.Forms.Application

When it executes I get an error

"Application is a type in 'forms' and cannot be used as an expression"

I am completely stumped as to what this means.

Thanks in Advance,

Larry
 
Larry said:
I have the following code:

Dim abc As New AboutBox.clsAbout
abc.ClientApp = System.Windows.Forms.Application

When it executes I get an error

"Application is a type in 'forms' and cannot be used as an
expression"

I am completely stumped as to what this means.

It means that Application is a type name, not an expression.

You can also not write

Dim i As Integer
i = String

because String is a type name, not a value. You would have to write

i = 17


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
* Larry said:
Dim abc As New AboutBox.clsAbout
abc.ClientApp = System.Windows.Forms.Application

When it executes I get an error

"Application is a type in 'forms' and cannot be used as an expression"

Use 'Application.ProductName' instead.
 
Back
Top