问题描述:

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"
相关阅读:
Top