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

Form inside a panel - Windows CE

P: 2
Hello,
I'm new to VB.NET, so my question may be basic for you.
I'm using MS Visual Studio 2008 (VB) to write an application that runs in Windows CE 5.0.
I have created a project for smart devices with one form (Form1) and I have added a second form (Form2).
In Form1 I have added a panel and a button and I want to display Form2 inside the panel when the user click the button.
This is the base, than I will add other buttons and other forms.
I have searched the web for an answer and in this community I found a post ("Form inside a panel" by Fabio Nov 20 '05) but it doesn't work for me because Form2 has not the property "TopLevel".
I usually write applications for desktop pc using Embarcadero C++ Builder and in that IDE is very easy to do such a thing, it's enough to set the panel as the parent of Form2 and you're done but here it doesn't seem to be so easy, at least for me.

Anybody can help me?

Thanks in advance

Stefano
Oct 29 '12 #1
Share this Question
Share on Google+
2 Replies


P: 2
Hello again,
I have found a solution that for me seems to works.
Instead of adding a form (Form2) I add a UserControl1 and in the code of the button click I set the parent of the UserControl as the panel and I set its property Visible to True.
In this way I can add as many UserControls as I need and hide or show them as necessary.
I apologize if my question seemed rushed and the solution trivial.
Unfortunately I'm not familiar with Visual Studio and it was a coincidence to find a solution a few minutes after I wrote my question ...
Thanks anyway for your attention

Stefano
Oct 29 '12 #2

Frinavale
Expert Mod 5K+
P: 9,731
Thank you for posting your solution :)

-Frinny
Oct 29 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.