PC Review


Reply
Thread Tools Rate Thread

Designing Forms not inheriting directly from System.Windows.Forms.Form

 
 
Patrick Long
Guest
Posts: n/a
 
      22nd Oct 2003
I am currently working with Forms in the CompactFramework. The designer
cannot open Forms that inherit from anything other than
System.Windows.Forms.Form.

I would like to catch the opening of Forms in the designer and change their
base class from the custom one to System.Windows.Forms.Form.

Any ideas on how i could do this?

I thought about trying this

#if NETCFDESIGNTIME == true

public class ListControlTest : System.Windows.Forms.Form

#else

public class ListControlTest : Charteris.Mobile.PooledForm

#endif

but that does not work

Thanks


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003


 
Reply With Quote
 
 
 
 
Joe Bork [MSFT]
Guest
Posts: n/a
 
      23rd Oct 2003
Hello Patrick,

This is a limitation of the device Forms designer in VS.NET 2003. We don't
support designing inherited forms (that is, forms not deriving directly
from System.Windows.Forms.Form), as you've found. If you modify the form
to inherit from something other than Form, you'll wind up getting the
desktop forms designer (instead of the device forms designer) and you won't
be able to add any controls because the project references don't match.
There's no good workaround for this issue; you can create the form in code,
and not use the designer, or you could design the form using the desktop
forms designer (which would require you to fixup the desktop designer's
code spit by hand).

Neither of these are very good solutions, I know. We're hoping to have
much better support for designing these kinds of forms (those that don't
inherit directly from Form) in Whidbey, but unfortunately this isn't
supported currently.

--Joe



--------------------
| From: "Patrick Long" <patrick.long@nospamplease_btinternet.com>
| Subject: Designing Forms not inheriting directly from
System.Windows.Forms.Form
| Date: Wed, 22 Oct 2003 09:32:04 +0100
| Lines: 32
|
| I am currently working with Forms in the CompactFramework. The designer
| cannot open Forms that inherit from anything other than
| System.Windows.Forms.Form.
|
| I would like to catch the opening of Forms in the designer and change
their
| base class from the custom one to System.Windows.Forms.Form.
|
| Any ideas on how i could do this?
|
| I thought about trying this
|
| #if NETCFDESIGNTIME == true
|
| public class ListControlTest : System.Windows.Forms.Form
|
| #else
|
| public class ListControlTest : Charteris.Mobile.PooledForm
|
| #endif
|
| but that does not work
|
| Thanks
|
|

--
This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
Chris Theorin
Guest
Posts: n/a
 
      24th Oct 2003
Whidbey... I hadn't heard that before...

"Joe Bork [MSFT]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello Patrick,
>
> This is a limitation of the device Forms designer in VS.NET 2003. We

don't
> support designing inherited forms (that is, forms not deriving directly
> from System.Windows.Forms.Form), as you've found. If you modify the form
> to inherit from something other than Form, you'll wind up getting the
> desktop forms designer (instead of the device forms designer) and you

won't
> be able to add any controls because the project references don't match.
> There's no good workaround for this issue; you can create the form in

code,
> and not use the designer, or you could design the form using the desktop
> forms designer (which would require you to fixup the desktop designer's
> code spit by hand).
>
> Neither of these are very good solutions, I know. We're hoping to have
> much better support for designing these kinds of forms (those that don't
> inherit directly from Form) in Whidbey, but unfortunately this isn't
> supported currently.
>
> --Joe
>
>
>
> --------------------
> | From: "Patrick Long" <patrick.long@nospamplease_btinternet.com>
> | Subject: Designing Forms not inheriting directly from
> System.Windows.Forms.Form
> | Date: Wed, 22 Oct 2003 09:32:04 +0100
> | Lines: 32
> |
> | I am currently working with Forms in the CompactFramework. The designer
> | cannot open Forms that inherit from anything other than
> | System.Windows.Forms.Form.
> |
> | I would like to catch the opening of Forms in the designer and change
> their
> | base class from the custom one to System.Windows.Forms.Form.
> |
> | Any ideas on how i could do this?
> |
> | I thought about trying this
> |
> | #if NETCFDESIGNTIME == true
> |
> | public class ListControlTest : System.Windows.Forms.Form
> |
> | #else
> |
> | public class ListControlTest : Charteris.Mobile.PooledForm
> |
> | #endif
> |
> | but that does not work
> |
> | Thanks
> |
> |
>
> --
> This posting is provided "AS IS" with no warranties, and confers no

rights.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
designing forms in outlook the form menu does not appear? =?Utf-8?B?Y29sZXM=?= Microsoft Outlook Form Programming 3 19th Mar 2007 06:20 PM
System.Windows.Forms.Form and System.Windows.Forms.RichTextBox Piotr Microsoft Dot NET 4 23rd Mar 2006 09:41 AM
Inheriting System.Windows.Forms.Form keeping designer Steve B. Microsoft Dot NET Compact Framework 1 2nd May 2005 03:44 PM
inheriting system.Windows.Forms.Design.ControlDesigner =?Utf-8?B?Q2hlcmlmIERpYWxsbw==?= Microsoft Dot NET Framework 2 11th Jan 2005 05:07 PM
inheriting from windows.forms.datagrid andrei Microsoft Dot NET Framework 1 30th Jul 2004 01:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:21 AM.