Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custome Namespace for Forms 1

Status
Not open for further replies.

txmed

Programmer
Mar 23, 2006
65
US
Hello everyone. I am working on a Windows Control Library project were I place most of my common controls and functions into a library so that they may be referenced in my other projects. I've been able to logically build my classes and controls using namespaces. For example, all of my controls are in namespace called "Controls" and my public classes are in a namespace called "Classes".

I have a couple of forms that I want to place into a namespace as well, but the IDE does not let me. When I place my Form class into a custom namespace, I get a bunch of errors in my error list. A couple of errors are "Event 'Load' cannot be found." and "Event 'FormClosing' cannot be found".

Does anyone know how I can place my forms into a custom naemspace?

Thanks!

(txmed)
 
Sorry for the misspelled words. I didn't do a good job proof reading my post.

(txmed)
 
I suspect that you are using vs 2005 and then the form is split up into two files. One for your code and one for the designer generated code (a partial class). You need to put both in the same namespace.

Christiaan Baes
Belgium

"My old site" - Me
 
Thank you so much chrissie. It worked like a charm.

Have a star!

(txmed)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top