473,326 Members | 2,680 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,326 software developers and data experts.

Can't clear Warnings

I guess my thing is that if you let the warnings sit then what's the point of
having them, so I like to clear them and I have a couple that I can't seem to.

1) Access of shared member, constant member, enum member or nested type
through an instance; qualifying expression will not be evaluated.

Here's the code:

MyContextMenu.Show(MyListView,
MyListView.PointToClient(MyListView.MousePosition( )))

I get the warning on MyListView.MousePosition(). MousePosition is a Point,
and a Point is what the param of PointToClient is looking for.

2) Late bound resolution; runtime errors could occur.

Dim i As Int32 = CType(MyListBox.SelectedItem.ID, Int32)

I get the warning on MyListBox.SelectedItem.ID even though I am explicity
casting it.

How do I clear these? (BTW, I know I can just turn it off, but there must
be a way to resolve these, musn't there?)

Ed

Apr 7 '07 #1
1 1789
MyListView.MousePosition uses an object instance (MyListView) to refer to a
shared member (MousePosition). It suffices to use syntax like
Control.MousePosition. VB.NET used to be forgiving about this, the latest
version treats it as a warning.

"EdB" wrote:
I guess my thing is that if you let the warnings sit then what's the point of
having them, so I like to clear them and I have a couple that I can't seem to.

1) Access of shared member, constant member, enum member or nested type
through an instance; qualifying expression will not be evaluated.

Here's the code:

MyContextMenu.Show(MyListView,
MyListView.PointToClient(MyListView.MousePosition( )))

I get the warning on MyListView.MousePosition(). MousePosition is a Point,
and a Point is what the param of PointToClient is looking for.

2) Late bound resolution; runtime errors could occur.

Dim i As Int32 = CType(MyListBox.SelectedItem.ID, Int32)

I get the warning on MyListBox.SelectedItem.ID even though I am explicity
casting it.

How do I clear these? (BTW, I know I can just turn it off, but there must
be a way to resolve these, musn't there?)

Ed
Apr 7 '07 #2

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

Similar topics

2
by: Jan | last post by:
This is de public array I use, intline is a variable integer also declared as public in a module. I want to clear the content of the string array strOrderList in Form2, but i get a error in form1....
18
by: Marko.Cain.23 | last post by:
Hi, I create a dictionary like this myDict = {} and I add entry like this: myDict = 1 but how can I empty the whole dictionary? Thank you.
82
by: robert bristow-johnson | last post by:
here is a post i put out (using Google Groups) that got dropped by google: i am using gcc as so: $ gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure...
1
by: rmiddelburg | last post by:
Hi all, how can I clear my a:visited links when a use a:active before or during an a:activate action. Richard
1
by: billiejoex | last post by:
Hi there, into a module of mine I 'warn' a message if a certain situation occurs: def add_anonymous_user(permissions=('r'): if 'w' in p: import warnings warnings.warn("it's not rencommended...
5
by: Yvonne | last post by:
Hi, I have this Access 2003 DB that handles Clients and their respective items of correspondence in a one to many relationship. Clients details are entered in frmPerson. When it comes to...
3
by: vingomail | last post by:
How to disable our browser back button? help me please
3
by: vingomail | last post by:
How can I clear the history of a browser page by using scripts or programming
0
by: minermadison | last post by:
Hi, I have an asp.net project written with VB in Visual Studio Professional 2005. Visual Studio has a bunch of warnings that I would like to ignore. In a Windows Form or Class Library...
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...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.