fbpx

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

More
7 months 2 weeks ago #1 by Dick
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

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #2 by Chris Pyrgas
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

XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #3 by Dick
Yes, that was it. Thanks!

Dick

Please Log in or Create an account to join the conversation.