Exception when adding Form to a TabPage in .NET compact 2.0

G

Guest

Hi,

In the .NET compact 1.0 framework it was possible to add a
System.Windows.Forms.Form to a System.Windows.Forms.TabPage. I've been trying
to perform the same thing on .NET compact 2.0 and get the following Exception:

NOTE: AddTabPanel is the method which adds the Form to the TabPage

Exception in AddTabPanel(Form aForm)
System.ArgumentException:
at
Microsoft.AGL.Common.MISC.HandleAr()
at
System.Windows.Forms.Control._SetParent()
at
System.Windows.Forms.Control.set_Parent()
at
ControlCollection.Add()

I've search the web but could not find anything. Not sure if this is a bug
or a known change in the 2.0 framework.

I would really appriciate any help on this issue. Thanks.
 
J

John Socha-Leialoha

Hosting a form inside a control wasn't really something MS planned for
people to do, and it mostly worked in CF 1.0. However, I would suggest
that instead of trying to make it work, you switch over to using a
custom control now that VS 2005 and CF 2.0 support design-time controls
for the Pocket PC.

-- John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top