Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old May 1st, 2007, 01:01 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default Class Cannot be Pulic in This Type of Prj

When adding an existing .cls module to a new project, I was presented with a dialog saying:

    'cls<ClassName>' can not [sic] be public in this type of project.
    The item has been changed to private.

What is the meaning of this? (The dialog has a help button, but the VS help system is non-functional on my workstation.)

What [u]exactly</u> gets changed in the file holding the class I'm adding.

I had created this class in a WebClass project. That project still uses the class. Is the conversion of this class to private going to have a detrimental effect in my WebClass project? (It is used by the project internally; it is never exposed to the Internet Server processes—if that's even possible.)
Reply With Quote
  #2 (permalink)  
Old May 1st, 2007, 01:25 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Standalone projects cannot exposes interfaces, this is why VB is complaining and wants to set that Class as Private.
The problem arises if that same class is used in other projects, like dll or other generic ActiveX components, that exposes that class as an interface.
Please let me know if you need more info

"There are two ways to write error-free programs. Only the third one works."
Unknown
Reply With Quote
  #3 (permalink)  
Old May 1st, 2007, 04:42 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I suppose from what you wrote that being in a webclass project caused the class to fit the description “used in other projects, like dll.” But it does not seem that the class would be exposed as an interface from being in a WC prj.

Plus—now, with the file being changed to private—it is now private in both prjs.

Does that seem an accurate application of what you posted?
Reply With Quote
  #4 (permalink)  
Old May 1st, 2007, 05:07 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it depends.
does it need to be public in one project, and private in the other? that is the problem, otherwise it can be set to Private in both.

"There are two ways to write error-free programs. Only the third one works."
Unknown
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about value class type saadli BOOK: Ivor Horton's Beginning Visual C++ 2008 ISBN: 978-0-470-22590-5 4 December 3rd, 2008 10:15 PM
Guidelines Item 3: Replace System.Type with Type Ixtlia BOOK: Professional .NET 2.0 Generics 0 August 19th, 2007 05:09 AM
deploying asp.net application using websetup prj shupiR ASP.NET 1.0 and 1.1 Basics 0 December 21st, 2005 08:12 AM
Shall i use ASP page and ASPX pages in in .net prj bvrao VS.NET 2002/2003 4 January 5th, 2004 04:39 AM



All times are GMT -4. The time now is 03:13 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.