Click here to Skip to main content
15,914,014 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Can anyone give me a sample data model of a flight reservation? Pin
Estys12-Mar-12 2:19
Estys12-Mar-12 2:19 
QuestionRegister Wiaaut.dll Pin
ivo7510-Mar-12 10:52
ivo7510-Mar-12 10:52 
AnswerRe: Register Wiaaut.dll Pin
Dave Kreskowiak10-Mar-12 12:20
mveDave Kreskowiak10-Mar-12 12:20 
GeneralRe: Register Wiaaut.dll Pin
ivo7511-Mar-12 4:39
ivo7511-Mar-12 4:39 
GeneralRe: Register Wiaaut.dll Pin
Dave Kreskowiak11-Mar-12 10:13
mveDave Kreskowiak11-Mar-12 10:13 
GeneralRe: Register Wiaaut.dll Pin
ivo7511-Mar-12 10:37
ivo7511-Mar-12 10:37 
AnswerRe: Register Wiaaut.dll Pin
YuanJianzhong25-Mar-12 15:09
YuanJianzhong25-Mar-12 15:09 
QuestionExecuteScalar won't work? Pin
Midnight Ahri9-Mar-12 14:32
Midnight Ahri9-Mar-12 14:32 
AnswerRe: ExecuteScalar won't work? Pin
Dave Kreskowiak9-Mar-12 15:12
mveDave Kreskowiak9-Mar-12 15:12 
AnswerRe: ExecuteScalar won't work? Pin
Shameel10-Mar-12 17:47
professionalShameel10-Mar-12 17:47 
GeneralRe: ExecuteScalar won't work? Pin
Shameel11-Mar-12 19:32
professionalShameel11-Mar-12 19:32 
QuestionSetup DSN programmatically on the fly Pin
KreativeKai9-Mar-12 8:03
professionalKreativeKai9-Mar-12 8:03 
AnswerRe: Setup DSN programmatically on the fly Pin
Dave Kreskowiak9-Mar-12 15:09
mveDave Kreskowiak9-Mar-12 15:09 
GeneralRe: Setup DSN programmatically on the fly Pin
KreativeKai12-Mar-12 1:17
professionalKreativeKai12-Mar-12 1:17 
GeneralRe: Setup DSN programmatically on the fly Pin
Dave Kreskowiak12-Mar-12 5:02
mveDave Kreskowiak12-Mar-12 5:02 
GeneralRe: Setup DSN programmatically on the fly Pin
KreativeKai12-Mar-12 7:26
professionalKreativeKai12-Mar-12 7:26 
Questionhi Pin
hisuka139-Mar-12 2:16
hisuka139-Mar-12 2:16 
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[^]

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.