form designer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Arkadiusz Smolak

    #1

    form designer

    Hi,

    I need a help. I have form inherited from other form. The base form
    implementation is placed in other assembly. I try to open my inherited form
    in designer but visual studio throws an exception. My question is: "how can
    I debug visual studio form designer?" As I remember in Visual 6.0 it was
    possible by running two visual session and attaching first one to the
    second. Unfortunately in VS .NET 2005 it seems that it doesn't work.
    What is the solution?

    Thanks.

    Jurek


  • Kevin Spencer

    #2
    Re: form designer

    Assuming that your other form is in a project, don't reference the assembly;
    include the project in the solution that uses it. You can include the same
    project in many solutions.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    Software Composer
    Thoughts and Ideas about programming, philosophy, science, arts, life, God, and related subjects.


    If the Truth hurts, wear it.

    "Arkadiusz Smolak" <as_shark@poczt a.onet.plwrote in message
    news:%23p1GJe85 GHA.140@TK2MSFT NGP03.phx.gbl.. .
    Hi,
    >
    I need a help. I have form inherited from other form. The base form
    implementation is placed in other assembly. I try to open my inherited
    form in designer but visual studio throws an exception. My question is:
    "how can I debug visual studio form designer?" As I remember in Visual 6.0
    it was possible by running two visual session and attaching first one to
    the second. Unfortunately in VS .NET 2005 it seems that it doesn't work.
    What is the solution?
    >
    Thanks.
    >
    Jurek
    >

    Comment

    • Bruce Wood

      #3
      Re: form designer

      On Oct 4, 8:12 am, "Arkadiusz Smolak" <as_sh...@poczt a.onet.plwrote:
      Hi,
      >
      I need a help. I have form inherited from other form. The base form
      implementation is placed in other assembly. I try to open my inherited form
      in designer but visual studio throws an exception. My question is: "how can
      I debug visual studio form designer?" As I remember in Visual 6.0 it was
      possible by running two visual session and attaching first one to the
      second. Unfortunately in VS .NET 2005 it seems that it doesn't work.
      What is the solution?
      Is this the sort of information you're looking for:
      http://msdn2.microsoft.com/en-us/library/5ytx0z24.aspx

      Comment

      • Arkadiusz Smolak

        #4
        Re: form designer

        Thank you for the answer. I saw this article earlier and it's about debuging
        Custom Windows Forms Controls at Design Time. Unfortunetely I don't know how
        to aply it to debugging form. It seems that framework doesn't call my form
        constructor when I open it in designer.

        Arek

        "Bruce Wood" <brucewood@cana da.comwrote in message
        news:1159999991 .116539.250760@ b28g2000cwb.goo glegroups.com.. .
        On Oct 4, 8:12 am, "Arkadiusz Smolak" <as_sh...@poczt a.onet.plwrote:
        >Hi,
        >>
        >I need a help. I have form inherited from other form. The base form
        >implementati on is placed in other assembly. I try to open my inherited
        >form
        >in designer but visual studio throws an exception. My question is: "how
        >can
        >I debug visual studio form designer?" As I remember in Visual 6.0 it was
        >possible by running two visual session and attaching first one to the
        >second. Unfortunately in VS .NET 2005 it seems that it doesn't work.
        >What is the solution?
        >
        Is this the sort of information you're looking for:
        http://msdn2.microsoft.com/en-us/library/5ytx0z24.aspx
        >

        Comment

        • Bruce Wood

          #5
          Re: form designer

          No... the Designer calls the constructor of your form's _base class_
          when you open it in the Designer. If you want to debug your form's
          constructor as it applies at design time, you have to open a form
          _derived_ from your form. Then the Designer will run your form's
          constuctor.

          Arkadiusz Smolak wrote:
          Thank you for the answer. I saw this article earlier and it's about debuging
          Custom Windows Forms Controls at Design Time. Unfortunetely I don't know how
          to aply it to debugging form. It seems that framework doesn't call my form
          constructor when I open it in designer.
          >
          Arek
          >
          "Bruce Wood" <brucewood@cana da.comwrote in message
          news:1159999991 .116539.250760@ b28g2000cwb.goo glegroups.com.. .
          On Oct 4, 8:12 am, "Arkadiusz Smolak" <as_sh...@poczt a.onet.plwrote:
          Hi,
          >
          I need a help. I have form inherited from other form. The base form
          implementation is placed in other assembly. I try to open my inherited
          form
          in designer but visual studio throws an exception. My question is: "how
          can
          I debug visual studio form designer?" As I remember in Visual 6.0 it was
          possible by running two visual session and attaching first one to the
          second. Unfortunately in VS .NET 2005 it seems that it doesn't work.
          What is the solution?
          Is this the sort of information you're looking for:
          http://msdn2.microsoft.com/en-us/library/5ytx0z24.aspx

          Comment

          • Arkadiusz Smolak

            #6
            Re: form designer

            Unfortunetely it doesn't work for me. I have to VS studio opened. The first
            one I'm attaching to the socond proccess nad set breakpoint in form
            constructor (it's my derrived form) then I'm switching to the second
            instance and opening form in designer. The debugger from first session
            doesn't stop in constructor.

            Arek

            "Bruce Wood" <brucewood@cana da.comwrote in message
            news:1160067759 .848446.303460@ c28g2000cwb.goo glegroups.com.. .
            No... the Designer calls the constructor of your form's _base class_
            when you open it in the Designer. If you want to debug your form's
            constructor as it applies at design time, you have to open a form
            _derived_ from your form. Then the Designer will run your form's
            constuctor.
            >
            Arkadiusz Smolak wrote:
            >Thank you for the answer. I saw this article earlier and it's about
            >debuging
            >Custom Windows Forms Controls at Design Time. Unfortunetely I don't know
            >how
            >to aply it to debugging form. It seems that framework doesn't call my
            >form
            >constructor when I open it in designer.
            >>
            >Arek
            >>
            >"Bruce Wood" <brucewood@cana da.comwrote in message
            >news:115999999 1.116539.250760 @b28g2000cwb.go oglegroups.com. ..
            On Oct 4, 8:12 am, "Arkadiusz Smolak" <as_sh...@poczt a.onet.plwrote:
            >Hi,
            >>
            >I need a help. I have form inherited from other form. The base form
            >implementati on is placed in other assembly. I try to open my inherited
            >form
            >in designer but visual studio throws an exception. My question is:
            >"how
            >can
            >I debug visual studio form designer?" As I remember in Visual 6.0 it
            >was
            >possible by running two visual session and attaching first one to the
            >second. Unfortunately in VS .NET 2005 it seems that it doesn't work.
            >What is the solution?
            >
            Is this the sort of information you're looking for:
            http://msdn2.microsoft.com/en-us/library/5ytx0z24.aspx
            >
            >

            Comment

            • Bruce Wood

              #7
              Re: form designer


              Arkadiusz Smolak wrote:
              Unfortunetely it doesn't work for me. I have to VS studio opened. The first
              one I'm attaching to the socond proccess nad set breakpoint in form
              constructor (it's my derrived form) then I'm switching to the second
              instance and opening form in designer. The debugger from first session
              doesn't stop in constructor.
              >
              Arek
              I'm afraid I don't quite follow what you're doing. The idea goes
              something like this:

              public class MyForm : System.WIndows. Forms.Form
              {
              public MyForm()
              {
              ... my form's constructor code ...
              }
              }

              public class MyDerivedForm : MyForm
              {
              public MyDerivedForm()
              {
              ... usual constructor stuff ...
              }
              }

              If you set Visual Studio as the startup program for your project, then
              set a breakpoint inside the MyForm constructor, the constructor should
              run if you open MyDerivedForm in the Visual Studio Designer. If you
              open MyForm in the Designer, then the breakpoint will not be hit, since
              the constructor that is running is that for System.Windows. Forms.Form,
              not MyForm. The Designer runs the MyForm constructor only when
              designing MyDerivedForm.

              Is that what you're doing and it still doesn't work for you?

              Comment

              Working...