MTSkull Posted February 13, 2004 Posted February 13, 2004 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 Quote "Beer is proof that God loves us and wants us to be happy." -Benjamin Franklin
Heiko Posted February 13, 2004 Posted February 13, 2004 (edited) Dunno. Workaround: Create a new form in the project, then copy/paste the code. Edited February 14, 2004 by Heiko Quote .nerd
*Experts* Nerseus Posted February 14, 2004 *Experts* Posted February 14, 2004 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 Quote "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
rustyd Posted February 16, 2004 Posted February 16, 2004 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. Quote rustyd
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.