473,804 Members | 3,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Partial Class Getting Extra Designer Form

Hi,

I have moved some of the implementation of a form into a second
file and enclosed it with "partial class ..." VS wants to give the
second file its own designer form. How do I prevent that and how
do I get rid of the second one?

Thanks,
Gary
Jul 11 '07 #1
2 1726
"Gary Brown"
I have moved some of the implementation of a form into a second
file and enclosed it with "partial class ..." VS wants to give the
second file its own designer form. How do I prevent that and how
do I get rid of the second one?
I should have added that I started with a blank code file for the second
implementation file.


Jul 11 '07 #2
Not sure how to prevent VS to display the blank designer form, but you can
manually modify the project file for your partial class to include the
following node:
<DependentUpon> MyFormFileName. cs</DependentUpon>
(or vb) - this way when you open your project, the partial class appears
under your form, sumilar to Designer class. You will still need to open with
View-Code rather then double-clicking though.

If anyone knows how to let VS know that the new partial definition should
NOT have a separate (blank) designer, or at least how to define default
opening action on it as code view - would appreciate a lot.

"Gary Brown" wrote:
"Gary Brown"
I have moved some of the implementation of a form into a second
file and enclosed it with "partial class ..." VS wants to give the
second file its own designer form. How do I prevent that and how
do I get rid of the second one?

I should have added that I started with a blank code file for the second
implementation file.


Jul 12 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1856
by: Sebastian Sylvan | last post by:
Hey. I have two questions. First of all I'm using the Visual C# Express Beta. When you create a windows application it will automatically split the main form into two files using partial classes. In the solution explorer this is seen hierarchially as somthing like - MainForm.cs -> MainForm.Designer.cs
3
3927
by: Rene | last post by:
VS 2005 uses the Partial Class & <form>.Designer.cs for its windows forms generated code. When upgrading from 2003 the project wizard did not break the form, it left it the old way. I would like to split them. Who the heck do you do that? Other than using the IDE and add a new Form, I was not able to insert the partial Form class in the nice hierarchical way the IDE does it. How do you do that? Thanks.
4
2232
by: Brett Romero | last post by:
I have a .NET 1.1 form that was migrated into 2.0. Its class file is in form1.cs. I've created another "code" file named form1.designer.cs and with this code: partial class form1 in the same namespace as form1. form1.cs declares its class as public partial class form1: Form
9
3269
by: TheSteph | last post by:
In VS 2005 Form files are in 3 parts : From1.cs, Form1.Designer.cs and Form1.resx. In VS 2003 there is only one ".cs files". How can I split my old VS2003 ".cs files" files in 2 files : From.cs and Form.Designer.cs, and get thoses file "grouped" in the Solution explorer under the main Form.cs file ?
3
3202
by: erich | last post by:
In VS2005, creating a new form creates the form class and a partial (frm*.designer.vb) class file and displays the partial class beneath the main form frm*.vb, which is great. However, when extracting the designer code elements from an existing form class into its own partial class, (or creating new ones) the partial class is displayed in the Solution Explorer under the Project name, that is, at the same level as the file from which it...
2
5568
by: Joseph Geretz | last post by:
When I create a Form, the VB IDE creates the following files in the following hierarchy: Form1.cs Form1.Designer.cs Form1.resx Both Form1.cs and Form1.Designer.cs are partial implementations of a single physical class definition. The VB IDE properly recognizes Form1.cs as a Form (i.e. double-clicking opens the Form designer). It also recognizes
3
1498
by: =?Utf-8?B?TWljaGFlbCBkZSBWZXJh?= | last post by:
Just curios to know why a vb class is referred to as partial class. Especially after adding this item to your project. Thanks for any clarifications.
5
1985
by: SAL | last post by:
Hello, I would like to be able to set the WHERE clause of a select statement on the fly. I have a DataAccess layer designed using the DataSet designer and a BusinessLogic layer using classes. The business logic layer is decorated using the <System.ComponentModel.DataObject()> attributes and they are used to bind to controls and Object datasets on web forms. Is there a resonable way to set the WHERE clause on the fly with a partial class...
2
2008
by: pihentagy | last post by:
Hi all! Is it possible to have a bindingsource in a partial class? Well it is possible, but I have the following issues: - this.components is defined in the .designer.cs file. If I call my own initialization method before the GUI's one, I will not have this.components. If I call it after, it's too late, because I'd like to bind it to a GUI component - my IDE (#develop) doesn't display my own partial class as part of the Form. What...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10583
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10337
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3822
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.