Click here to Skip to main content
16,016,076 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: hi Pin
Simon_Whale9-Mar-12 2:34
Simon_Whale9-Mar-12 2:34 
AnswerRe: hi Pin
Dave Kreskowiak9-Mar-12 3:12
mveDave Kreskowiak9-Mar-12 3:12 
QuestionMaking a programming language in VB Pin
Member 83786918-Mar-12 22:29
Member 83786918-Mar-12 22:29 
AnswerRe: Making a programming language in VB Pin
Simon_Whale8-Mar-12 22:44
Simon_Whale8-Mar-12 22:44 
GeneralRe: Making a programming language in VB Pin
Member 837869112-Mar-12 21:47
Member 837869112-Mar-12 21:47 
GeneralRe: Making a programming language in VB Pin
Simon_Whale12-Mar-12 23:14
Simon_Whale12-Mar-12 23:14 
AnswerRe: Making a programming language in VB Pin
Bernhard Hiller9-Mar-12 2:26
Bernhard Hiller9-Mar-12 2:26 
AnswerRe: Making a programming language in VB Pin
Bert Mitton9-Mar-12 7:40
professionalBert Mitton9-Mar-12 7:40 
When I need to do scripting I usually just use VB, and then use the VBCompiler to create the assembly.

VB
Public Function CreateObject(ByVal code As String) As Object
    Dim vbCP As New VBCodeProvider
    Dim dir As String = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
    Dim Options As New CompilerParameters
    Options.GenerateInMemory = True
    Dim cr As CompilerResults
    Options.ReferencedAssemblies.Add(dir + "System.Data.dll")
    Options.ReferencedAssemblies.Add(dir + "System.XML.dll")
    Options.ReferencedAssemblies.Add(dir + "System.Windows.Forms.dll")
    Options.ReferencedAssemblies.Add(dir + "System.Data.DataSetExtensions.dll")
    Options.ReferencedAssemblies.Add(dir + "Mscorlib.dll")
    Options.ReferencedAssemblies.Add(dir + "System.dll")
    Options.ReferencedAssemblies.Add(dir + "System.Drawing.dll")
    Options.ReferencedAssemblies.Add(dir + "Microsoft.VisualBasic.dll")
    Options.ReferencedAssemblies.Add(dir + "System.Web.Services.dll")
    cr = vbCP.CompileAssemblyFromSource(Options, code)
    If cr.Errors.Count > 0 Then
        Return cr.Errors
    End If
    oAssy = cr.CompiledAssembly
    Return Nothing
End Function


If you get an assembly, then you can use reflection to run the new assembly.

Here's a decent article which I used when I was starting on reflection.

Reflection in .NET[^]
AnswerRe: Making a programming language in VB Pin
Johan Hakkesteegt12-Mar-12 1:56
Johan Hakkesteegt12-Mar-12 1:56 
QuestionMultiple Keys Combination using Select Case Pin
Midnight Ahri8-Mar-12 19:47
Midnight Ahri8-Mar-12 19:47 
AnswerRe: Multiple Keys Combination using Select Case Pin
Richard MacCutchan8-Mar-12 21:34
mveRichard MacCutchan8-Mar-12 21:34 
QuestionSerializer complex class Pin
boagrius8-Mar-12 13:42
boagrius8-Mar-12 13:42 
AnswerRe: Serializer complex class Pin
Bernhard Hiller8-Mar-12 22:17
Bernhard Hiller8-Mar-12 22:17 
QuestionModules don't like Overloading Pin
Clark Kent1237-Mar-12 8:43
professionalClark Kent1237-Mar-12 8:43 
AnswerRe: Modules don't like Overloading Pin
Eddy Vluggen7-Mar-12 11:10
professionalEddy Vluggen7-Mar-12 11:10 
AnswerRe: Modules don't like Overloading Pin
Simon_Whale7-Mar-12 11:28
Simon_Whale7-Mar-12 11:28 
QuestionRe: Modules don't like Overloading Pin
Clark Kent1238-Mar-12 1:35
professionalClark Kent1238-Mar-12 1:35 
AnswerRe: Modules don't like Overloading Pin
Simon_Whale8-Mar-12 1:49
Simon_Whale8-Mar-12 1:49 
GeneralRe: Modules don't like Overloading Pin
Clark Kent1238-Mar-12 3:42
professionalClark Kent1238-Mar-12 3:42 
GeneralRe: Modules don't like Overloading Pin
Simon_Whale8-Mar-12 3:48
Simon_Whale8-Mar-12 3:48 
AnswerRe: Modules don't like Overloading Pin
Dave Kreskowiak7-Mar-12 11:59
mveDave Kreskowiak7-Mar-12 11:59 
QuestionRe: Modules don't like Overloading Pin
Clark Kent1238-Mar-12 1:31
professionalClark Kent1238-Mar-12 1:31 
AnswerRe: Modules don't like Overloading Pin
Dave Kreskowiak8-Mar-12 3:14
mveDave Kreskowiak8-Mar-12 3:14 
QuestionForce the vertical scrollbar down Pin
Brandon-X120007-Mar-12 2:39
Brandon-X120007-Mar-12 2:39 
AnswerRe: Force the vertical scrollbar down Pin
Dave Kreskowiak7-Mar-12 3:37
mveDave Kreskowiak7-Mar-12 3:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.