Is It Possible To Allow Users To Type VB Code

AtRuntime And Have It Take Effect

Page 1 of 1

4 Replies - 888 Views - Last Post: 18 November 2008 - 08:33 PM Rate Topic: -----

#1 Shadow_x21  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 46
  • Joined: 15-September 08

Is It Possible To Allow Users To Type VB Code

Posted 18 November 2008 - 07:09 PM

Shadow_x21

Hi, Is it Possible To Let A User Directly Add VB Code To An Application To Minupulate It Or Add Things(Fnctions, ect.) At Runtime Or Would I Have To Interpet It.

Let's Say User Type's This In A Textbox :

Dim hi as string = "hi"
msgbox(hi)

Is It Possible To Do That At Runtime.

Thanks...
Is This A Good Question/Topic? 0
  • +

Replies To: Is It Possible To Allow Users To Type VB Code

#2 jacobjordan  Icon User is offline

  • class Me : Perfection
  • member icon

Reputation: 113
  • View blog
  • Posts: 1,499
  • Joined: 11-June 08

Re: Is It Possible To Allow Users To Type VB Code

Posted 18 November 2008 - 07:14 PM

I'm not sure i quite understand. When you are debugging, pressing the pause button on the debugging toolbar will suspend your application where it is, then you can make code changes and press play again to run it again with those changes. That's what it sounds like you are asking, but your example has me a bit confused.
Was This Post Helpful? 0
  • +
  • -

#3 Shadow_x21  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 46
  • Joined: 15-September 08

Re: Is It Possible To Allow Users To Type VB Code

Posted 18 November 2008 - 07:32 PM

Shadow_x21

What I Meant Is At runtime Allow The End User( Like Some Dude Who Lives In Africa or Japan) To Modify or Add VB Code Directly To the Application.

Note: The End User Will Have The exe not the project

Another Example: Let The User Make Their Own Button

dim xButton as new button

xButton.visble = true
xButton.text = "My Runtime Button"
xButton.top = 10
xButton.left = 10

form1.controls.add(xButton)

Like That. I Just Want The End User To Be Able To Code In VB If They Want, At Runtime.

Shadow_x21
Was This Post Helpful? 0
  • +
  • -

#4 jacobjordan  Icon User is offline

  • class Me : Perfection
  • member icon

Reputation: 113
  • View blog
  • Posts: 1,499
  • Joined: 11-June 08

Re: Is It Possible To Allow Users To Type VB Code

Posted 18 November 2008 - 07:52 PM

What you are trying to do is not possible. It is possible to decompile .NET applications with many free applications like .NET Reflector, but i know of no utility that will modify code in the application.
Was This Post Helpful? 0
  • +
  • -

#5 magicmonkey  Icon User is offline

  • D.I.C Regular

Reputation: 106
  • View blog
  • Posts: 484
  • Joined: 12-September 08

Re: Is It Possible To Allow Users To Type VB Code

Posted 18 November 2008 - 08:33 PM

Reflection Emit via MSIL (your brain will explode looking into this), or if you want an integrated IDE for your application you can look at Visual Studio Tools for Applications (VSTA) which has replaced the VSA scripting engine of old.

This post has been edited by magicmonkey: 18 November 2008 - 08:34 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1