fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

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

How to prevent a command prompt to appear on a windowless program? 1 year 2 weeks ago #4864

  ic2's Avatar Topic Author ic2 Offline Posts: 486
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.

How to prevent a command prompt to appear on a windowless program? 1 year 2 weeks ago #4867

  Chris's Avatar Chris Offline Posts: 1164
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.

How to prevent a command prompt to appear on a windowless program? 1 year 2 weeks ago #4869

  ic2's Avatar Topic Author ic2 Offline Posts: 486
Yes, that was it. Thanks!

Dick

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

  • Page:
  • 1