prowin -b - Hide default window

Posted by doa on 22-Aug-2016 10:30

I am trying to execute the prowin32.exe with the -b param.

Without the parameter the program executes fine without showing any window.

But when i add the -b parameter, the default window shows in the taskbar.

Is there a way to use the -b parameter without showing any window?

I am on Windows 10 with 11.6.1

Oh and the procedure is completely empty so it's not my code ;)

Posted by Stefan Drissen on 23-Aug-2016 16:41

When running with a gui client in batch mode we assign the default-window:title with a guid and then use the windows API calls FindWindowA to find the window with the guid title and then use ShowWindow to hide it.

All Replies

Posted by Adriano Correa on 22-Aug-2016 15:19

You are right. Same issue on 11.6.2 and 10.2B.

Posted by Brian K. Maher on 23-Aug-2016 07:24

doa,
 
Can you provide your .p (even with it being “empty”) along with the full command line you are using?
 
I tested this here using 11.6.2 64-bit on Windows 10 with the following command line and I get nothing in the task bar...
 
prowin -b -p empty.p
 
Brian

Posted by tpavlovic on 23-Aug-2016 07:45

Holy crap. Are you kidding? I really did not expect this from *you*. It's probably because your eye is too slow to see it. Put PAUSE 1 in the empty.p (well, then it stops being empty.p, doesn't it?) Why is it always such a problem to understand a simple question? Are you deliberately playing dumb all the time or is it something else?

Although I truly don't understand the problem with seeing the hidden Progress window in the taskbar, but for once just try to understand the problem w/o being so picky. And dumb, of course.

This is why I stopped opening support cases with you long long time ago. Either it took too many effort to explain what the problem really was or 'I was doing it all wrong'.

No offense.

-b session is visible in the taskbar and deal with it.

Posted by Mike Fechner on 23-Aug-2016 07:49

"No offense."

This is not very obvious. I'm glad you are adding this here - otherwise others might misunderstand this.

Posted by marian.edu on 23-Aug-2016 08:15

No offence but why are you trying to start the 'graphical' client in batch mode instead of just doing that with the 'character' one (_progres.exe)? And, how do you execute that? From command prompt, starting the process from some other language, from another Progress runtime?

Posted by Frank Meulblok on 23-Aug-2016 08:17

Anyway, back to the topic at hand:

"Is there a way to use the -b parameter without showing any window?"

1. Use _progres.exe instead of prowin32.exe/prowin.exe.

2. Make sure to redirect stdout to a file.

Posted by doa on 23-Aug-2016 10:36

I cannot use _progres because my code usere "GUI" controls (ocx and so on) and .Net stuff in many places (i nerver show anything though)

Afaik the Character client can't deal with this stuff.

Posted by Mike Fechner on 23-Aug-2016 10:44

OE11 can use .NET from the TTY client.

Controls are a different thing - as they may require a message loop. Try it - or share more details about the .NET classes you are using so that we can advice.





Posted by Brian K. Maher on 23-Aug-2016 10:44

doa,
 
If you remove the -b and instead set the SHOW-IN-TASKBAR property to false for the window that you create, would that do it for you?
 
Brian

Posted by doa on 23-Aug-2016 10:48

@Brian not really since i don't wan't any message to block the execution i just want to log everything

Also i don't create a window, OE does and as i said it doesn't do this without the -b param

@Mike Sadly my code is far from ready to run on the char client :/

Posted by Brian K. Maher on 23-Aug-2016 10:54

Not sure of your real limitations since you are not providing much useful info, but consider...
 
OUTPUT TO ... KEEP-MESSAGES statement
 
SESSION:APPL-ALERT-BOXES attribute
SESSION:SUPPRESS-WARNINGS attribute
SESSION:SYSTEM-ALERT-BOXES attribute
 
 

Posted by doa on 23-Aug-2016 11:04

KEEP-MESSAGES doesn't work with "VIEW AS ALERT BOX" Messages, which my code uses and i don't wand to suppress any messages i want to log them....

Posted by Brian K. Maher on 23-Aug-2016 11:10

LOG-MANAGER handle
 
after this email there is nothing more I can do for you as you are asking for help but parceling out info in very tiny little tidbits after telling us that what we suggested won’t work.  If you want useful answers then you should lay out your complete problem including the limitations you have in your code.

Posted by doa on 23-Aug-2016 11:17

yeah...i am very sorry that i can't explain my whole application to you

To clear things up:

1.) I need to use prowin32.exe because my code is written for it and i can't rewrite my huge application

2.) I don't want anything to block the execution and i don't want any window to open (which shouldnt happen from my code but programming errors happen and legacy code is a ***)

The thing i don't get is why OE opens a window when you use -b and doesn't when you don't use this parameter.

It doesn't make any sense....

Posted by Stefan Drissen on 23-Aug-2016 16:41

When running with a gui client in batch mode we assign the default-window:title with a guid and then use the windows API calls FindWindowA to find the window with the guid title and then use ShowWindow to hide it.

Posted by doa on 24-Aug-2016 02:25

[quote user="Stefan Drissen"]

When running with a gui client in batch mode we assign the default-window:title with a guid and then use the windows API calls FindWindowA to find the window with the guid title and then use ShowWindow to hide it.

[/quote]

Thats a good idea, thx

This thread is closed