views:

24

answers:

1

I have a Windows project that loads in forms from a database and dynamically generates them. It reads the control properties of each control from a table and dynamically adds it to the form.

Unfortunately, I have to change the project so that the forms are actually in the Visual Studio project. Instead of repainting all of those forms, I'd like to be able to have the original program load the form from the database and copy all of the controls to the clipboard. Then, I could just paste the controls into the Visual Studio designer. So, how can I have a form programmatically copy its controls to the clipboard?

BTW, I already tried the approach of having the original program generate the Designer.vb file. This has been somewhat useful. But, a lot of forms have to be consolidated and moved from their own page to a tab on a tab control. So, it would be much easier if I could just move the controls to the clipboard.

Thanks,

Mike

A: 

I'd suggest opening the aspx files as xml documents programmatically and adding the nodes you need that way. At least that way, it will let you generate all your files in one go. Manipulating the aspx files in the XML DOM has to be a more sensible solution that relying on the clipboard.

Neil Trodden
I forgot to mention that this is a Windows app.
Mike