Stop Designer from popping up on a .cs file?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff Johnson

    #16
    Re: Stop Designer from popping up on a .cs file?

    "Michael A. Covington" <mc@uga.eduwrot e in message
    news:%2358YaYrO JHA.4312@TK2MSF TNGP06.phx.gbl. ..
    >>Can you right click on the file in question, choose Open With....
    >>Then select the code editor and click the "Set as Default" button.
    >>Thereafter, when you double click the file, it should open in the code
    >>editor.
    >>
    >*duh!* yes... that sounds like exactly what is needed. Thanks.
    >
    And it isn't. Even THAT won't let me set different default behavior for 2
    different files that are partial classes of the same class. Ah well...
    Yeah, I was pretty sure your situation was too specialized for that to be
    the answer.


    Comment

    • John Vottero

      #17
      Re: Stop Designer from popping up on a .cs file?

      "Michael A. Covington" <mc@uga.eduwrot e in message
      news:%2358YaYrO JHA.4312@TK2MSF TNGP06.phx.gbl. ..
      >
      "Michael A. Covington" <mc@uga.eduwrot e in message
      news:eqwGAWrOJH A.1172@TK2MSFTN GP03.phx.gbl...
      >>
      >"Chris Dunaway" <dunawayc@gmail .comwrote in message
      >news:53fd92f a-e11b-4c91-89bf-4ee7f5b33bf8@e2 g2000hsh.google groups.com...
      >>On Oct 29, 3:40 pm, "Michael A. Covington" <m...@uga.eduwr ote:
      >>>I had a lot of code in Form1.cs, so I moved some of it into another
      >>>file,
      >>>Form1Op.cs , which is still a partial class of Form1 : Form.
      >>>>
      >>>Whenever I open Form1Op.cs, it wants to open in Form Designer rather
      >>>than in
      >>>View Code. How can I change that? (Or can I?)
      >>>>
      >>>It compiles fine.
      >>>
      >>Can you right click on the file in question, choose Open With....
      >>Then select the code editor and click the "Set as Default" button.
      >>Thereafter, when you double click the file, it should open in the code
      >>editor.
      >>
      >*duh!* yes... that sounds like exactly what is needed. Thanks.
      >
      And it isn't. Even THAT won't let me set different default behavior for 2
      different files that are partial classes of the same class. Ah well...
      >
      I apologize if this has already been mentioned, I can't see the entire
      thread.

      Have you tried edition the project.csproj file? You should have something
      like this:

      <Compile Include="Form1. cs">
      <SubType>Form </SubType>
      </Compile>
      <Compile Include="Form1O p.cs">
      <DependentUpon> Form1.cs</DependentUpon>
      </Compile>
      <Compile Include="Form1. Designer.cs">
      <DependentUpon> Form1.cs</DependentUpon>
      </Compile>

      try adding "<SubType>F orm</SubType>" into the Form1Op.cs Compile so you wind
      up like this:

      <Compile Include="Form1. cs">
      <SubType>Form </SubType>
      </Compile>
      <Compile Include="Form1O p.cs">
      <SubType>Form </SubType>
      <DependentUpon> Form1.cs</DependentUpon>
      </Compile>
      <Compile Include="Form1. Designer.cs">
      <DependentUpon> Form1.cs</DependentUpon>
      </Compile>




      Comment

      • John Vottero

        #18
        Re: Stop Designer from popping up on a .cs file?


        "MC" <for.address.lo ok@www.ai.uga.e du.slash.mcwrot e in message
        news:%23zTR$Z8O JHA.5044@TK2MSF TNGP05.phx.gbl. ..
        "John Vottero" <JVottero@mvpsi .comwrote in message
        news:BB2264C5-4ABD-4C62-B85B-E202D6ACE3F9@mi crosoft.com...
        >
        >Have you tried edition the project.csproj file? You should have
        >something
        >like this:
        >>
        > <Compile Include="Form1. cs">
        > <SubType>Form </SubType>
        > </Compile>
        > <Compile Include="Form1O p.cs">
        > <DependentUpon> Form1.cs</DependentUpon>
        > </Compile>
        > <Compile Include="Form1. Designer.cs">
        > <DependentUpon> Form1.cs</DependentUpon>
        > </Compile>
        >>
        >try adding "<SubType>F orm</SubType>" into the Form1Op.cs Compile so you
        >wind
        >up like this:
        >>
        > <Compile Include="Form1. cs">
        > <SubType>Form </SubType>
        > </Compile>
        > <Compile Include="Form1O p.cs">
        > <SubType>Form </SubType>
        > <DependentUpon> Form1.cs</DependentUpon>
        > </Compile>
        > <Compile Include="Form1. Designer.cs">
        > <DependentUpon> Form1.cs</DependentUpon>
        > </Compile>
        >
        That sounds promising, but I want to say that Form1Op.cs is *not* a form
        (for editing purposes), not that it is one.
        >
        In that case, say <SubType>Code </SubType>.

        Comment

        Working...