Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / April 2004

Tip: Looking for answers? Try searching our database.

accessing nonstatic object from static and nonstatic methods

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Clement - 02 Apr 2004 00:09 GMT
I have been handed a  project that someone else started and most of it was
developed in the VS.NET design mode.  For whatever reasons, when I try to
make changes to the controls in VS.NET design mode, I suddenly get a ton of
these errors:

cs(1189): 'class.form.checkedListBox1' denotes a 'field' where a 'class' was
expected

I was not getting any errors until I made a couple of changes within VS.NET.
So I'm trying to understand why these errors are occurring.  I need
checkedListBox1 to be nonstatic, but I also need to be able to access it
from a static method.  Any clues to this or why the compiler bugs out after
making changes in design mode would be greatly appreciated.

Chris
John Eikanger [MSFT] - 05 Apr 2004 23:50 GMT
Hi, Chris

I see that Ying-Shen Yu has responded to a duplicate of this post in
microsoft.public.dotnet.framework.windowsforms.  Please check for your
answer there.

Posting multiple messages in this way is called multi-posting, which is
considered poor manners in the newsgroups and will get you flamed if some
people notice. This is because an answer to one post is not available in
the other.  If I answer your question in one thread and it was already
answered in another thread, I've wasted my time.  The preferred technique
is called crossposting, which puts linked copies of the same post in
multiple newsgroups..  You can crosspost using Outlook Express or the MSDN
Web interface by explicitly typing the names of the groups (separated by
semi-colons or commas) in the Newsgroup box that appears when you post.

Example:  microsoft.public.vb.com;microsoft.public.vb.database.ado etc.

HTH,

John Eikanger
Microsoft Developer Support

This posting is provided ?AS IS? with no warranties, and confers no rights.
(c) 2004 Microsoft Corporation.  All rights reserved.
--------------------
| From: "Chris Clement" <noemail@please.com>
| Subject: accessing nonstatic object from static and nonstatic methods
[quoted text clipped - 26 lines]
|
| Chris

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.