Hi all,
I'm doing a windows form designer project. Right now I have the design-time mode made, namely, I can use the project to create different form designs at design time. My problem is that I need to be able to switch between design-time mode and run-time mode. Say, when the project is in design-time mode, the user can changes properties of controls in design mode, and when it's in run-time mode, the user can enter data to the controls. Any idea how to do it When I switch to the run-time mode, do I have to recreate an instance for each of the controls, and set it's properties as well Or there's an easy way to switch between the two modes
Thanks.
Kim

switch between design-time mode and run-time mode
Jay-r
sangminny,
I think I could benefit by seeing your project - would you mind linking your project at its current location I do not see a link at your blog to Designer-sangminny.zip...
Carlos G uzman Alvarez
It's good idea.
Can I get sample code
thanks
NeoRJ
I uploaded the sample.
this is not completed. but, I hope it's helpful.
http://blog.naver.com/sangminny/110005716781
Finse
the moment the user wants to switch from run- to designmode, you could create the designer form, and then put the running form as childcontrol in it.
Marc
SAPO19875
I did not have to filter out properties. What exception did you get
MeMe_89765
I changed the method to copy properties.
it looks like working...
as you mentioned, filtering properties isn't problem.
thanks Kimberly
ckzulueta
Sorry I can't open your project because I have an older version of VB .net IDE.
I suggest you do a first hand exception catch to understand the issue.
Liron231
I'm not sure my approach is same to Kimberly's
Assumption : user is operating a panel.
but, If I copy all properties, this process raises Exception. Which properties do I have to filter about I need help.
thanks
Amit Thakur
Kim
Bladergr
Thanks Marc! Problem solved! Since I have the function to create the components in the design time, which uses host.CreateComponent. I just modified that function by using Activator.CreateInstance instead of host.CreateComponent. Then I got everything for the view mode. It took me about two days to discovery this easy solution. I'm so happy!
tjtooj
thank you for your reply
it's difficult to explain what is problem. because of my english problem,
I attached sample.
please watch 'StartDesign' function of ControlDesigner class in Designer Project. and run this sample.
I'm finding the reason of the error, your short comment will be good help to me. please let me know what you can find in my sample code.
thank you
this link is my blog. please download attached file
http://blog.naver.com/sangminny/110004722669 -> Designer-sangminny.zip