Creating an app that works like the Visual Studio form designer...

J

Johnny Jörgensen

Now, the following will probably sound weird to you, but I can assure you
that there is a good reason for why I want to do it. Unfortunately, I'm not
ad liberty to disclose WHY at this moment in time, so you will have to take
my word for it.

What I want to do in the application I'm developing is to open a Visual
Studio designer file (C# or VB) and present the user of the application with
a picture of the form - almost just like it appears in the Visual Studio
designer.

An example screenshot of what I'm tyring to do can be found here:
http://www.jcsoftwaresolutions.com/VisualizeAppDump.jpg

The user SHOULDN'T be able to:
- Move or close the form
- Move or resize the components
- Interact with the components (e.g. write the in the textboxes, drop down
comboboxes and select items)
- Edit the form or components in any way

but he/she SHOULD be able to:
- See the layout
- Select a specific control, which should then be outlined.
- If the control is a tab control, he/she should be able to switch between
tab pages like in the VS editor
- It the control is a MenuStrip, he/she should be able to drop the menu to
see the items (but not click them) - actually, the user should be able to
keep the menu dropped and select a menu item, which should then be outlined
(but not editable).

My question is: Where would you start doing something like this? My Idea was
to open the designer file, read it line by line and create a new form
containing the desired controls. Then show it in a MDI client area or panel
or whatever.

The problem is:
How do I keep the user from moving and resizing the form?
How do I keep the user from interacting with (most of the) components on the
form (e.g. write the in the textboxes, drop down comboboxes and select
items)?
How do I let the user "select" the components?
What should I do if the form file contains references to a third party
control that is not installed on the machine where the program runs?

Please let me hear how you would accomplish it... I'm really looking forward
to getting some ideas.

Cheers,
Johnny J.
 

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