5 Replies - 2252 Views - Last Post: 01 March 2010 - 05:48 AM Rate Topic: -----

#1 Guest_chris l*


Reputation:

MainForm Won't Show() New Forms

Posted 01 March 2010 - 03:29 AM

Hi,

I have an App which currently consists of one main form with a few tabControls and RichTextBoxes etc. A couple of months back I added an "About" box without any problem showing it something like

Form About = new About1();
About.ShowDialog();


However if I now add additional forms to the project the main form can't "see" them. I mean Visual Studio's auto-complete feature doesn't show them and if I type a reference anyway I get an error about them not existing or being in namespace. If I create a second new form, they can both "see" each other but not the main form.

What am I missing?

Is This A Good Question/Topic? 0

Replies To: MainForm Won't Show() New Forms

#2 FlashM   User is offline

  • D.I.C Lover
  • member icon

Reputation: 383
  • View blog
  • Posts: 1,195
  • Joined: 03-December 09

Re: MainForm Won't Show() New Forms

Posted 01 March 2010 - 03:31 AM

Could you post some of your code...
Was This Post Helpful? 0
  • +
  • -

#3 Guest_Chris l*


Reputation:

Re: MainForm Won't Show() New Forms

Posted 01 March 2010 - 03:38 AM

View PostFlashM, on 01 March 2010 - 02:31 AM, said:

Could you post some of your code...


Form warning = new frmInTouchWarning();
            warning.ShowDialog();



Sorry here's the actual error I get Error 1 The type or namespace name 'frmInTouchWarning' could not be found
Was This Post Helpful? 0

#4 eclipsed4utoo   User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1535
  • View blog
  • Posts: 5,972
  • Joined: 21-March 08

Re: MainForm Won't Show() New Forms

Posted 01 March 2010 - 04:32 AM

It kind of sounds like a namespace issue, where youe main form has one namespace and the forms that you are adding have another namespace, but its hard to tell without more of your code.

This post has been edited by eclipsed4utoo: 01 March 2010 - 04:33 AM

Was This Post Helpful? 1
  • +
  • -

#5 FlashM   User is offline

  • D.I.C Lover
  • member icon

Reputation: 383
  • View blog
  • Posts: 1,195
  • Joined: 03-December 09

Re: MainForm Won't Show() New Forms

Posted 01 March 2010 - 04:59 AM

Is it possible that you added a folder in your solution explorer and your forms are located in that folder? If this is the case, then your forms are automatically in a different namespace than your main form... But as eclipsed4utoo said, it's really hard to tell... Could you verify what is the namespace of your main form and your other forms that are not seen by the main form...
Was This Post Helpful? 1
  • +
  • -

#6 Guest_Chris l*


Reputation:

Re: MainForm Won't Show() New Forms

Posted 01 March 2010 - 05:48 AM

Ah guys it's cool you got it. They were simply a different namespace. I guess I need to read up a little more about them.

Thank you so much for your help
Was This Post Helpful? 0

Page 1 of 1