0

VB.Net 代码。我想隐藏用编译代码打开的黑匣子......如何?

每当我编译它时,它都会打开一个 cmd shell...

    Public Shared Function CompileVBCode(sourceFile As String, exeFile As String) As Boolean
    Dim vbprovider As VBCodeProvider = New VBCodeProvider()
    Dim cp As New CompilerParameters()
    cp.ReferencedAssemblies.Add("System.dll")
    cp.GenerateInMemory = False
    cp.GenerateExecutable = True
    cp.OutputAssembly = exeFile
    Dim cr As CompilerResults = vbprovider.CompileAssemblyFromSource(cp, sourceFile)
4

1 回答 1

0
cp.CompilerOptions += "/t:winexe"
于 2013-05-15T14:45:46.153 回答