forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Console app and GUI app without console popping up

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
dangt
Newbie


Joined: 19 May 2009
Posts: 20

PostPosted: Mon Apr 07, 2014 11:00 pm    Post subject: Console app and GUI app without console popping up Reply with quote

Is there a way to hide the console with I'm using the GUI?

Thanks
Dang



console_gui.jpg
 Description:
 Filesize:  32.83 KB
 Viewed:  1273 Time(s)

console_gui.jpg


Back to top
View user's profile Send private message
dangt
Newbie


Joined: 19 May 2009
Posts: 20

PostPosted: Mon Apr 07, 2014 11:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Mon Apr 07, 2014 11:47 pm    Post subject: Reply with quote

Howdy,

Code:

runh cmd /c ping google.com,pipe
%%a = @pipe()
info %%a
Back to top
View user's profile Send private message AIM Address
dangt
Newbie


Joined: 19 May 2009
Posts: 20

PostPosted: Mon Apr 07, 2014 11:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Tue Apr 08, 2014 12:15 am    Post subject: Reply with quote

Interesting!

Is your console program launching the GUI executable?
Back to top
View user's profile Send private message AIM Address
dangt
Newbie


Joined: 19 May 2009
Posts: 20

PostPosted: Tue Apr 08, 2014 2:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Tue Apr 08, 2014 3:18 pm    Post subject: Reply with quote

Aha!

I don't have vds6 lol!!

Didn't know you guys could write to the console!
Back to top
View user's profile Send private message AIM Address
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Tue Apr 08, 2014 9:55 pm    Post subject: Reply with quote

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 Wink
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group