Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / January 2008

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Johnny Jörgensen - 11 Jan 2008 21:20 GMT
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.
Family Tree Mike - 12 Jan 2008 03:07 GMT
I would suggest looking at some of the opensource IDE alternatives to Visual
Studio.  Perhaps some of the code can be used to achive your requirements.

Look at http://csharp-source.net/open-source/ides to get started.  I have
not used any, but they seem like they may help.

> 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
[quoted text clipped - 45 lines]
> Cheers,
> Johnny J.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.