Previous Thread:   Transfer File from PDA to Win CE through USB

9/29/2005 3:25:57 PM    Custom control problem under VS 2005 Beta 2 CF 2.0
Hi,  
  
I have several custom controls that all work correctly when placed on a form  
  
and appear on the toolbox. The problem that I'm seeing is that 2 of the 5  
  
controls disable form inheritance when placed on the base form. If I remove  
  
both of these controls from the base form then my form inheritance works  
  
again and I can see the other controls on the form.  
  
I get the error "Visual inheritance is currently disabled because the base  
  
class references a device-specific component or contains p/invoke" on the  
  
non-base forms at design time.  
  
I have checked and neither of the controls uses p/invoke.  
  
What would a device specific component be? The SIP control? I remarked it  
  
out.  
  
What other things could cause this?  
  
Anyone care to see the code?  
  
These are some of the references.  
  
using System;  
  
using System.Collections.Generic;  
  
using System.ComponentModel;  
  
using System.Drawing;  
  
using System.Data;  
  
using System.Text;  
  
using System.Windows.Forms;  
  
using System.Threading;  
  
using Microsoft.WindowsCE.Forms;  
  
using System.Diagnostics;  
  
I also have a reference to "System.Windows.Forms.DataGrid" in the solution  
  
explorer  
  
However i cant add "using System.Windows.Forms.DataGrid" cause i get the  
  
error that it is a type not a namespace.  
  
These 2 controls are the only ones that have a reference to the datagrid  
  
(possible clue)  
  
So if I have a custom control that refers to the datagrid does this kill  
  
form inheritance?  
  
Thanks

7250599242


9/29/2005 3:43:49 PM    Re: Custom control problem under VS 2005 Beta 2 CF 2.0
UPDATE  
  
I removed my references to the grid control and remarked out all lines using  
  
the grid. Now the custom control works with form inheritance.  
  
However this creates a big problem for me. I need to see the datagrid on  
  
forms that inherit from the base form so i can set table and column styles  
  
at design time :(  
  
Any ideas what can be done to allow a datagrid on a base form to work with  
  
form inheritance?  
  
Thanks  
  
"Jen" <jpierce2@austin.rr.com> wrote in message  
  
news:eLuvEQTxFHA.3720@TK2MSFTNGP14.phx.gbl...

9/29/2005 4:56:56 PM    Re: Custom control problem under VS 2005 Beta 2 CF 2.0
CLARIFICATION  
  
These are custom controls that reference the datagrid control. If the  
  
references to the datagrid are pulled out of the custom control then form  
  
inheritance works again.  
  
"Jen" <jpierce2@austin.rr.com> wrote in message  
  
news:eySx6aTxFHA.916@TK2MSFTNGP10.phx.gbl...

9/30/2005 4:07:09 PM    Re: Custom control problem under VS 2005 Beta 2 CF 2.0
There's good information in this article...  
  
http://symbian.sys-con.com/read/113332.htm  
  
You may need to tag your custom control(s) with the "DesktopCompatible"  
  
attribute.  
  
--  
  
Tim Wilson  
  
..NET Compact Framework MVP  
  
"Jen" <jpierce2@austin.rr.com> wrote in message  
  
news:eLuvEQTxFHA.3720@TK2MSFTNGP14.phx.gbl...  
  
form  
  
remove


Search

search