write and run code during runtime 
Author Message
 write and run code during runtime

Hi there

does anyone know if it is possible to write code during runtime of the
program into a textbox or something else and run it from there?

Does anyone have an idea or is there no way to do this?

thx

Daniel



Sun, 13 Jun 2004 10:05:53 GMT  
 write and run code during runtime

Quote:

> does anyone know if it is possible to write code during runtime of the
> program into a textbox or something else and run it from there?

> Does anyone have an idea or is there no way to do this?

There might be a way using the scripting control, but watch out for the
usual possible security issues:

 http://msdn.microsoft.com/scripting/

--
Joe Foster <mailto:jlfoster%40znet.com>  "Regged" again? <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Sun, 13 Jun 2004 10:49:02 GMT  
 write and run code during runtime
Hi Daniel!

You can try MSScriptControl.

Dim objScriptingEngine As New MSScriptControl.ScriptControl
objScriptingEngine.Language = "VBScript"

strCode = "Sub Main " & vbCrLf & _
"    ' Do anything here " & vbCrLf & _
"End Sub"

objScriptingEngine.AddCode strCode
objScriptingEngine.Run "Main"

regards,
Konstantin



Quote:
> Hi there

> does anyone know if it is possible to write code during runtime of the
> program into a textbox or something else and run it from there?

> Does anyone have an idea or is there no way to do this?

> thx

> Daniel



Sun, 13 Jun 2004 17:14:49 GMT  
 write and run code during runtime
hi

cool thats all i need...  security should not be a prob. The form is only
aviable for people who know what they do ;-)

thx

Daniel




Quote:

> > does anyone know if it is possible to write code during runtime of the
> > program into a textbox or something else and run it from there?

> > Does anyone have an idea or is there no way to do this?

> There might be a way using the scripting control, but watch out for the
> usual possible security issues:

>  http://msdn.microsoft.com/scripting/

> --
> Joe Foster <mailto:jlfoster%40znet.com>  "Regged" again?

<http://www.xenu.net/>
Quote:
> WARNING: I cannot be held responsible for the above        They're
coming  to
> because  my cats have  apparently  learned to type.        take me away,
ha ha!



Sun, 13 Jun 2004 19:03:02 GMT  
 write and run code during runtime
Hi,

Other than the scripting control (which may be all you need), there also is
Sax Software's Sax Basic Engine.  You can get information from
www.saxsoft.com.

--
Richard Grier  (Microsoft Visual Basic MVP)
Hard & Software
12962 West Louisiana Avenue
Lakewood, CO  80228
303-986-2179 (voice)
303-986-3143 (fax)
Leave voice mail or fax that I can receive as email at 303-593-9315
Author of Visual Basic Programmer's Guide to Serial Communications, 2nd
Edition ISBN 1-890422-25-8 (355 pages).
For information look on my homepage at http://www.hardandsoftware.net.
Use the Books link to order.  For faster service contact the publisher at
http://www.mabry.com.



Mon, 14 Jun 2004 01:37:57 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Getting the function's name during runtime while running in the scope of the function

2. Changing code during runtime

3. Can't modify code during runtime anymore?

4. how can I change code during runtime?

5. Code Runs During Compile

6. Changing Equations in code during run-time

7. Cancelling file writing process during long writes

8. Writing Code to run in different resolutions.

9. Running setup.exe by writing code

10. running code from Access that runs code in an excel spreadsheet

11. Trying to run mdb using A2K Runtime generates runtime error

12. How do I hide a query during runtime

 

 
Powered by phpBB® Forum Software