-1

I try to lunch an executable file within my windows form vb.net application, but the first screen lunched were maximized..i want to be as it is, in minimized state..

my code is:

    Dim oProcess As System.Diagnostics.Process 

    Dim oPSI As New System.Diagnostics.ProcessStartInfo

    oPSI.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized

    oPSI.FileName = "path\application.exe"

    oPSI.Arguments = ""

    oProcess = Process.Start(oPSI)
ziad mansour
  • 349
  • 6
  • 25

2 Answers2

1
oPSI.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized

Remove this line

-1

I you launch you application from a terminal does i work? if yes you can use

 System.Console.Write()

to do it like in the terminal but from your programm. I think you can tell the terminal to open it in minimize like so:

System.Console.WriteLine("start /min apli.exe")

Good luck!