473,320 Members | 1,856 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,320 software developers and data experts.

Error message when converting VB 2003 app to VB 2005

As I work to convert a working VB 2003 app that has no error messages to VB
2005, I have been presented with more than 100 instances of the following
warning message:

"Access of shared member, constant member, enum member or nested type
through an instance; qualifying expression will not be evaluated."
Can someone explain what has changed within VB that leads to this warning?
What steps should I follow to address it?
Dec 7 '05 #1
2 1488
VB allows you to access shared methods through an instance of the class. I
am not sure why it does, since it doesn't make sense to do this for shared
methods anyway.

Now you just see a warning about it. All it says is that the variable you
are using to call the shared method/property is not going to get evaluated -
it is going to be ignored. The method will just be called on the class
type. So if your variable was never instantiated, it shouldn't make a
difference, since it can't and won't be used to actually call the method.

It is good practice to call shared methods on the class directory, and not
an instance of it.

"EdPoint" <in**@educationpoint.net> wrote in message
news:eL****************@TK2MSFTNGP10.phx.gbl...
As I work to convert a working VB 2003 app that has no error messages to
VB
2005, I have been presented with more than 100 instances of the following
warning message:

"Access of shared member, constant member, enum member or nested type
through an instance; qualifying expression will not be evaluated."
Can someone explain what has changed within VB that leads to this warning?
What steps should I follow to address it?

Dec 7 '05 #2
"EdPoint" <in**@educationpoint.net> schrieb:
As I work to convert a working VB 2003 app that has no error messages to
VB
2005, I have been presented with more than 100 instances of the following
warning message:

"Access of shared member, constant member, enum member or nested type
through an instance; qualifying expression will not be evaluated."
Can someone explain what has changed within VB that leads to this warning?
What steps should I follow to address it?

The simplest solution is to turn off the warning:

Select "My Project" in solution explorer, -> "Compile" -> "Instance variable
accesses shared member" -> set "Notification" to "None".

Alternatively you can change the method calls to use the name of the class
you want to call the shared member on instead of a variable.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Dec 7 '05 #3

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

Similar topics

10
by: Gary Hughes | last post by:
I'm getting the following error when attempting to link a managed C++ dll. I can't find any reference to these errors with google. Can anyone help? I've included the class definition causing the...
5
by: Bruce Schechter | last post by:
I just started to develop an ASP.NET application in vs.net 2003 . But each time I try to execute the application (which is basically empty so far), I get a dialog box titled "Microsoft Development...
16
by: | last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I keep getting the following error:- Error In:...
1
by: Friso Wiskerke | last post by:
Hi All, We've got an VS.2003 ASPNET (VB) webproject which we would like to convert to VS.2005 so that we can make use of the Master Page feature. Converting the initial pages to 2005 is not such...
7
by: Charlie Brookhart | last post by:
I have a program (posted below) that is supposed to take liters, which is the user input, and convert it to pints and gallons. The pints and gallons are displayed in a read only textbox. I don't...
2
by: VMI | last post by:
In the Event Viewer I've been getting this error when I try to run an already-made web application: "aspnet_wp.exe could not be started. The error code for the failure is 80070545. This error..."....
2
by: DCC700 | last post by:
VS 2005 Converted Header causing error when publishing After converting from Visual Studio 2003 to 2005, I have had several issues with a header that is used throughout the project. The...
5
by: marathoner | last post by:
I am in the process of converting a Visual C++ 6.0 project to Visual Studio 2005. The conversion is almost complete, but in the linking phase, I get the error: LINK : fatal error LNK1104:...
25
by: Blasting Cap | last post by:
I keep getting errors that pop up when I am trying to convert an application from dotnet framework 1.1 to framework 2.0. The old project was saved in sourcesafe from Visual Studio 2003, and I have...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.