GUI without or minimized console by macrofile on WinXP

Dear all

I developed a GUI application by macrofile(hoge.C) on winXP.
I try to run the application from batch file(hoge.bat), example code as follows

$ROOTSYS\bin\root -l hoge.C

Then the console and GUI get started running in monitor.
I want to be only GUI in monitor when start the application.
Can the GUI application run without or minimized console?

Any help with this issue would be greatly appreciated.
Thank you.
Tasuku

Hi,

Sorry, but as far as I know, there is no way to hide or to minimize the console when starting root.

Cheers, Bertrand.

If you have cygwin installed, you can take a look at it’s run.exe (which is designed to do exactly this).

Here are pieces from the batch file to start XWindows:

SET CYGWIN_ROOT=\cygwin
SET RUN=%CYGWIN_ROOT%\bin\run -p /usr/X11R6/bin
%RUN% xterm -e /usr/bin/bash -l

Cheers,
Charles

You can launch your Windows application with the “START” command:

[code]C:\Users>help start
Starts a separate window to run a specified program or command.

START [“title”] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/AFFINITY ] [/WAIT] [/B] [command/program]
[parameters]

"title"     Title to display in  window title bar.
path        Starting directory
B           Start application without creating a new window. The
            application has ^C handling ignored. Unless the application
            enables ^C processing, ^Break is the only way to interrupt
            the application
I           The new environment will be the original environment passed
            to the cmd.exe and not the current environment.
MIN         Start window minimized
MAX         Start window maximized
SEPARATE    Start 16-bit Windows program in separate memory space
SHARED      Start 16-bit Windows program in shared memory space
LOW         Start application in the IDLE priority class
NORMAL      Start application in the NORMAL priority class
HIGH        Start application in the HIGH priority class
REALTIME    Start application in the REALTIME priority class
ABOVENORMAL Start application in the ABOVENORMAL priority class
BELOWNORMAL Start application in the BELOWNORMAL priority class
AFFINITY    The new application will have the specified processor
            affinity mask, expressed as a hexadecimal number.
WAIT        Start application and wait for it to terminate
command/program
            If it is an internal cmd command or a batch file then
            the command processor is run with the /K switch to cmd.exe.
            This means that the window will remain after the command
            has been run.

            If it is not an internal cmd command or batch file then
            it is a program and will run as either a windowed application
            or a console application.

parameters  These are the parameters passed to the command/program[/code]

Hi bellenot,

Thank you for your help.

Best regards.
Tasuku

Hi cplager,

Thank you for your information but I have not installed cygwin.
I will try to install cygwin.

Best regards.
Tasuku

Hi fine,

Thank you for your advice.
“START” command from command line was successful to run the application without another console.
Then, I tried to use “START” commands in batch file.

START /MIN $ROOTSYS\bin\root -l hoge.C

When double-clicked on the batch file(hoge.bat), Console seems to poped from the taskbar.
I think that Root doesn’t run without one console.

Best regards.
Tasuku

[quote=“Tasuku”]…
Then, I tried to use “START” commands in batch file.

START /MIN $ROOTSYS\bin\root -l hoge.CWhen double-clicked on the batch file(hoge.bat), Console seems to poped from the taskbar.
I think that Root doesn’t run without one console.
[/quote]When you click your “batch” from the “File Explorer” you create the console for your “batch” file first . This is what you see. At this point Windows is not aware you are going to use “START”.
To start “batch file” minimized too you should create a shortcut for your batch file first.
For example, click your file with the “right mouse button” and select “send to Desktop” menu option. This should create you a so-called shortcut (aka “symbolic link” under Unix ). Then click this shortcut with your “right mouse button” and select “Properties” to get the dialog attached. Select “Run: Minimized”.


Hi fine.

Sorry for my late reply.

Thank you for your advice.
I tried your advice, but it is not run minimized.
It seems to run minimized at first, but ,in the next breath, console launched from taskbar.

I thank your advice very mach.

Best regards
Tasuku