473,386 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

app is a type in forms

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
Nov 20 '05 #1
2 976
"Larry" <us**@domain.invalid> schrieb
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

Nov 20 '05 #2
* Larry <us**@domain.invalid> scripsit:
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.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: MarkB | last post by:
I am new to using reflection, and I can't understand why this code fails for sClass="CheckBox" 'get loaded assemblies oAssemblies = AppDomain.CurrentDomain.GetAssemblies() 'find our type in...
0
by: Fidias Gil de Montes | last post by:
In a Distributed Windows application, I receive the following message when the client calls the server: ************** Exception Text ************** System.InvalidCastException: Unable to cast...
6
by: MP | last post by:
Hello I want to have a public property (and Brows able) in one control, I use this code: public System.Windows.Forms.Form recordForm get { return _recordForm;} set {_recordForm = value;}
3
by: Mike in Paradise | last post by:
I have an application that is being passed objects which could either be an instance or a Type in the case of a Static Class When you do the GetType on the object that was originally a Static...
3
by: the fuzz | last post by:
yeah g'day..... is it somehow possible to not include the version & public key token in the call to Type.GetType(string) ie something like Type.GetType("System.Windows.Forms.ListView,...
5
by: Erol | last post by:
How do I get a type from a string? I'm retrieving a string value from my database so that I can set my property values dynamically. In the event "Form1_Load", you will see that I'm trying to set...
1
by: Marc | last post by:
Hi! I'm working with a C# client that calls a php web service. I've created a wrapper to call the service using .NET wsdl tool (adding a web reference). The call to the server works fine, it...
10
by: Arno R | last post by:
Hi all, I have a database that I need to use in different versions of Access. This is A97 in most places and A2k in a few other locations. (I develop in A97 and convert the db to A2k for these...
0
by: zootmastaflex | last post by:
im doing a music therapist program and i keep getting this error Im using visual c# express. This exception was created automatically by the program when i dragged and dropped databound controls to...
0
by: jhspoon | last post by:
Hi - I have an exit form macro that has a query and maco in it. When I run them separately, everything runs fine. When I run the exit form macro, I get a Type Mismatch error. Any thoughts on...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.