xsharp.eu • How to prevent a command prompt to appear on a windowless program?
Page 1 of 1

How to prevent a command prompt to appear on a windowless program?

Posted: Sat Jun 02, 2018 7:05 am
by ic2
I can't seem to find what I did in our Vulcan program to prevent a command prompt to appear on a windowless program. I'd say the code in X# is the same but it opens a command line prompt where the Vulcan program does not every time it starts and this doesn't close either. I tried to add
oApp:WindowStyle := System.Diagnostics.ProcessWindowStyle.Hidden
but this isn't recognized as a method on the App class.

The code is:

FUNCTION Start AS INT
//#s Startpoint is here
LOCAL oApp AS VOApp
LOCAL pi AS ProcessIcon
pi:=ProcessIcon{}
oApp := VOApp{}
Try
pi:Display()
oApp:Start()
Catch exception As System.Exception
// ....
FINALLY
pi:Dispose() // This removes the tray icon and is run when we return from oApp:Start
Environment.Exit(0)
end try
RETURN 0

Dick

How to prevent a command prompt to appear on a windowless program?

Posted: Sat Jun 02, 2018 10:04 am
by Chris
Hi Dick,

Just change the "Output type" of the app (in Project Properties/general) to "Windows Application" instead of Console, this will prevent it from displaying a console window.

Chris

How to prevent a command prompt to appear on a windowless program?

Posted: Sat Jun 02, 2018 12:28 pm
by ic2
Yes, that was it. Thanks!

Dick