By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,995 Members | 1,079 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,995 IT Pros & Developers. It's quick & easy.

form designer

P: n/a
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
Oct 4 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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
http://unclechutney.blogspot.com

If the Truth hurts, wear it.

"Arkadiusz Smolak" <as******@poczta.onet.plwrote in message
news:%2***************@TK2MSFTNGP03.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

Oct 4 '06 #2

P: n/a
On Oct 4, 8:12 am, "Arkadiusz Smolak" <as_sh...@poczta.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

Oct 4 '06 #3

P: n/a
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" <br*******@canada.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
On Oct 4, 8:12 am, "Arkadiusz Smolak" <as_sh...@poczta.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

Oct 5 '06 #4

P: n/a
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" <br*******@canada.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
On Oct 4, 8:12 am, "Arkadiusz Smolak" <as_sh...@poczta.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
Oct 5 '06 #5

P: n/a
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" <br*******@canada.comwrote in message
news:11**********************@c28g2000cwb.googlegr oups.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" <br*******@canada.comwrote in message
news:11**********************@b28g2000cwb.googleg roups.com...
On Oct 4, 8:12 am, "Arkadiusz Smolak" <as_sh...@poczta.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

Oct 17 '06 #6

P: n/a

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?

Oct 17 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.