473,788 Members | 2,893 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Oct 4 '06 #1
6 1879
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******@poczt a.onet.plwrote in message
news:%2******** *******@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

Oct 4 '06 #2
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

Oct 4 '06 #3
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*******@cana da.comwrote in message
news:11******** **************@ 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

Oct 5 '06 #4
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*******@cana da.comwrote in message
news:11******** **************@ 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
Oct 5 '06 #5
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*******@cana da.comwrote in message
news:11******** **************@ 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" <br*******@cana da.comwrote in message
news:11******* *************** @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

Oct 17 '06 #6

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
14164
by: Chris | last post by:
Hi, I'm trying to append text from another class to a generic richTextBox that I've added to a Windows form. I can't seem to figure out how to expose the richTextBox to append text to it. Thanks in advance, Chris
2
8313
by: Jaikumar | last post by:
Hi, 1) I have created one windows application, In the main form ( form1) i have added one usercontrol (usercontrol1), In that user control i am drawing one image. 2) In the UserControl1 i am showing one transparent form (form3) when ever user preseed left mouse button. 3) The form3 has one transparent user control (usercontrol2) that paints circles. That measn the circles will show on top the usercontrol1 image. 4) The form3 border style...
2
4881
by: baret bonden | last post by:
Trying to return a selected listbox item to another form .tried lots of ways; defining public variables and passing those as well as textboxes ..I' m able to display the chosen item on it's form in a textbox and I'm able to pass other variables to the 2nd form, but not the data I want . I should add this is a smartdeviceapplication(if that matters; not sure) Here's most of the test code .
18
1648
by: Jan Nielsen | last post by:
Hi I have a main form showing personal information (name, address etc.) bound to a dataset. One of the pieces of information is the Group the person belongs to. This is selected from a combo box. If I want to add a new group to the list. I open a new form like this myfrmAddGroup = New FrmAddGroup(Me.Dataset1) myfrmAddGroup.Show() myfrmAddGroup = Nothing
0
1808
by: Amiram Korach | last post by:
When you create a MDI form, you can attach a main menu to the parent and to the child. When a child form is active, its menu is merged with the parent menu. The problem is: when the forms are right to left, after merging the menus the parent menu is displayed left to the child menu, which is ok in left to right windows but not in right to left windows. After you play with your mouse with the menu items, the parent menu suddenly goes to the...
4
3160
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps further away, completely leaving the selector box area. Any ideas? VS 2003 and VB.Net This is a simple application at the moment but the form is inherited from a
7
3389
by: Terry | last post by:
I have a Mainform with a Statusbar. When opening another form or doing some processing I want to display info in the Statusbar of the Mainform. I have read a lot of articles on this & have come up with the code below. It seems to work(!!!) in that when coding the second form I can see the DisplayStatusMsg of the main form. During debug the code runs through & seemingly executes the call without error. But!...The message is not displayed....
4
5834
by: ThunderMusic | last post by:
Hi, I have a custom form that works fine when I debug it or run it in release mode but cannot be loaded in the designer... Actually, it can be loaded in the designer when no control is on it, but the resizing tool (in the designer) is offset both horizontally and vertically and when I put a control on it, as soon as I save, the designer throws an exception (but cannot be reproduced everytime) and the form cannot be loaded anymore unless...
8
2317
by: TomC | last post by:
I want to bypass the Windows Form Designer in VS, to create a form programmatically. The elements of the form are to be arranged in a table, and I want the size of the table (and therefore the number of elements) to be determined at runtime, so dragging and dropping on the Form Designer won't cut the mustard. I'm coming from a Java background, and have almost always built my GUI's programmatically, but I realize that in C# this practice...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10366
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
10173
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
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9967
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6750
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
5399
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
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
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

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.