View previous topic :: View next topic |
Author |
Message |
dangt Newbie
Joined: 19 May 2009 Posts: 20
|
Posted: Mon Apr 07, 2014 11:00 pm Post subject: Console app and GUI app without console popping up |
|
|
Is there a way to hide the console with I'm using the GUI?
Thanks
Dang
Description: |
|
Filesize: |
32.83 KB |
Viewed: |
1273 Time(s) |
|
|
|
Back to top |
|
|
dangt Newbie
Joined: 19 May 2009 Posts: 20
|
Posted: Mon Apr 07, 2014 11:09 pm Post subject: |
|
|
I found that I can hide the window by issue this command
WINDOW HIDE, #ConsoleWindowClass
Does anyone else have a better way?
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Mon Apr 07, 2014 11:47 pm Post subject: |
|
|
Howdy,
Code: |
runh cmd /c ping google.com,pipe
%%a = @pipe()
info %%a
|
|
|
Back to top |
|
|
dangt Newbie
Joined: 19 May 2009 Posts: 20
|
Posted: Mon Apr 07, 2014 11:55 pm Post subject: |
|
|
cnodnarb...sorry I wasn't clear...I'm compiling this as a console executable.
When I do that the console will always appear if I double click the executable.
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Tue Apr 08, 2014 12:15 am Post subject: |
|
|
Interesting!
Is your console program launching the GUI executable?
|
|
Back to top |
|
|
dangt Newbie
Joined: 19 May 2009 Posts: 20
|
Posted: Tue Apr 08, 2014 2:52 pm Post subject: |
|
|
I figured a way around this. Here is a sample code. You need to compile as integrated console executable.
if you run the programing with any command parameters then it will print "-help display this help menu"
if you double click it, a GUI will show up plus a console. But the console gets hidden. This was my original issue. (I couldn't hide the console..but now I can)
However if you run it without any parameters, then it will hide the console that called it. I'm now looking for away around this.
Code: |
:CMDLINE
IF %1
WRITELINE CONSOLE," -help display this help menu"
GOTO EXIT_CMDLINE
ELSE
REM *** No arguments was passed
REM *** hide console
WINDOW HIDE, #ConsoleWindowClass
END
Title test
DIALOG CREATE,New Dialog,-1,0,240,160
REM *** Modified by Dialog Designer on 4/7/2014 - 15:57 ***
DIALOG ADD,BUTTON,Test,74,109,,,Test
DIALOG SHOW
wait event
goto @event()
:EXIT_CMDLINE
:CLOSE
:testBUTTON
STOP
|
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Tue Apr 08, 2014 3:18 pm Post subject: |
|
|
Aha!
I don't have vds6 lol!!
Didn't know you guys could write to the console!
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Tue Apr 08, 2014 9:55 pm Post subject: |
|
|
I would almost suggest writing the console app and the GUI front end as two separate executables, but this is from a non-VDS6 user, chances are someone will pop in that knows better than I do
|
|
Back to top |
|
|
|