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 / Languages / C# / November 2006

Tip: Looking for answers? Try searching our database.

Trying to reference one of my forms and it isn't listed - Help??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Siv - 13 Nov 2006 17:03 GMT
Hi,

I have a form in my project called "Uploader" and I want to access it from a
menu within the main form using the following:

               Uploader frm = new Uploader();
               frm.ShowDialog();

Where normally when I type the word "Uploader" the intellisense lists the
form name ready for autocomplete I don't get it listed and if I manually
enter the code and compile, I get the following error:

Error 9 The type or namespace name 'Uploader' could not be found (are you
missing a using directive or an assembly reference?)

This is strange, I can do this with all my other forms and it works fine,
anyone know why this one just doesn't appear??

Siv
Martley, Near Worcester UK.
Chris Dunaway - 13 Nov 2006 19:26 GMT
> Hi,
>
[quoted text clipped - 13 lines]
> This is strange, I can do this with all my other forms and it works fine,
> anyone know why this one just doesn't appear??

Check to see if your Uploader form is in the same namespace as your
other forms.  Do you have a namespace statement at the top of the
Uploader form?  Is it the same as your other forms?  Is the Uploader
form in the same project or a different project?  If it is in a
different project, does that project have the same namespace as the
other forms?
Siv - 13 Nov 2006 20:10 GMT
Chris,
Thanks, I have been looking all over the place for the reason and it is
staring right at me. I had rebuilt this project after an issue with a
corrupted resource file.  The original program was named Tacsy so the
namespace was created as Tacsy as well.  When I recreated the solution and
imported the files I had used TACSY, so all my other forms that did work
contained Tascy (including the main form that was trying to show the new
one) as the namespace and my new one had TACSY.  Arrrrgggghhhhh!!!!

At least I will be able to sleep tonight now I know why the bl**dy thing was
complaining.

I develop in both C# and VB and came from a VB background and this case
sensitivity thing keeps catching me out.

Thanks again.

Siv

>> Hi,
>>
[quoted text clipped - 21 lines]
> different project, does that project have the same namespace as the
> other forms?
Peter Thornqvist - 13 Nov 2006 19:31 GMT
> This is strange, I can do this with all my other forms and it works fine,
> anyone know why this one just doesn't appear??

Is the form public?

Is it in a separate namespace?

Signature

Regards, Peter

Siv - 13 Nov 2006 20:12 GMT
Peter,
Thanks, it was the namespace. I have been looking all over the place for the
reason and it is staring right at me. I had rebuilt this project after an
issue with a corrupted resource file.  The original program was named
"Tacsy" so the namespace was created as "Tacsy" as well.  When I recreated
the solution and imported the files I had used "TACSY", so all my other
forms that did work contained "Tacsy" (including the main form that was
trying to show the new one) as the namespace and my new one had "TACSY".
Arrrrgggghhhhh!!!!

At least I will be able to sleep tonight now I know why the bl**dy thing was
complaining.

I develop in both C# and VB and came from a VB background and this case
sensitivity thing keeps catching me out.

Thanks again.

>> This is strange, I can do this with all my other forms and it works fine,
>> anyone know why this one just doesn't appear??
>
> Is the form public?
>
> Is it in a separate namespace?
Peter Thornqvist - 13 Nov 2006 20:28 GMT
> Thanks, it was the namespace.
[...]

You are not alone :)

Signature

Regards, Peter


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.