• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

How to create/add code at run time and be able to save to the project?

Hi,

I have heard about creating/add code at run time.

My question:

1. How to do it?
2. At what situation will be needed.
3. Could it save to the project after it is executed.
4. Could we also delete procedure at runtime, logically is could be if we could add code to it.

Suppose I want to create controls at runtime, at run time after the "Create_Control" procedure is called, I want to delete then "Create_Control" procedure. But I still want all the controls I created still exist on that form after the form is close from running.

Thank you.


0
emi_sastra
Asked:
emi_sastra
  • 2
1 Solution
 
RedKelvinCommented:
Take a look at these
http://www.codeproject.com/useritems/VBRunNET.asp
http://www.codeproject.com/dotnet/evaluator.asp


I really can't think of a use for it, I had a colleague use it once, but the doco is incomplete, and it took a lot of time to get it going.

You will not be able to save the project after
0
 
emi_sastraAuthor Commented:
Hi,

I don't understand the info of the link.

Thank you.
0
 
RedKelvinCommented:
ok take a look at this one, it is well explained
http://www.codeproject.com/vb/net/DotNetCompilerArticle.asp

Download the source example too, and give that a try
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now