当前位置: 动力学知识库 > 问答 > 编程问答 >

vb.net - CodeDom Black Box

问题描述:

VB.Net Code. I want to hide the black box that opens up with a compiled code... how?

It opens a cmd shell whenever I compile it...

 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)

网友答案:
cp.CompilerOptions += "/t:winexe"
分享给朋友:
您可能感兴趣的文章:
随机阅读: