Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a form I want to modify named Search. I saved it as SearchPat, and then added it to my project as an exsisting item. How do I get dot net to recognize it as a form so I can edit it with the form designer.

 

Thanks

MTS

"Beer is proof that God loves us and wants us to be happy."

-Benjamin Franklin

  • *Experts*
Posted

If it inherits from Windows.System.Form (or some other class that inherits from that), then the designer should recognize it automatically. Does the file you chose have the proper extension (cs or vb)? If not, the project may think it's a resource and not compilable source code (you can change that in the file's properties - click on the file in the solution explorer than open the properties window).

 

-Ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

If it shows up as a class module and not as a form and you copied the form and renamed the file then the problem is the class name conflicts with the same class you copied from.

 

In the new form, view code and make sure Class declaration is not the same as the form copied from.

 

Example:

If you copied Search.vb to SearchPat.vb and Search.vb shows up as a form and SearchPat.vb shows up as a class, then the class declaration for SearchPat.vb is Public Class Search, which should be changed to Public Class SearchPat.

rustyd

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...