Re: Hiding VIO window screensize changes?




Sorry, I can't parse this. One way to make a better exposition is
to list (one-by-one) what you want to do

Essentially, my app would do this when it was a MyApp.[BAT|CMD]-file:

REM Switch to 40x25
MODE 40,25

REM Do something, e.g.display C:\AUTOEXEC.BAT
TYPE C:\AUTOEXEC.BAT

REM Finally restore the previous screen setting, e.g. 80x25
MODE 80,25

"Problems": visible MODE switches. And an unrelated one: with a buggy
video driver (not SNAP, but the original one for IBM ThinkPads 380's,
385's, 560's and 600's) there's a problem with the cursor in fullscreen
modes. But back to the MODE-related issues:

First of all, IMHO there's no good reason to require an environment or
else don't execute "TYPE C:\AUTOEXEC.BAT". Next, another alternative
could be to distribute a single (Rexx) INSTALL.CMD, which creates my
own WPS objects and creates the file MyApp.EXE. But I prefer to avoid
work-arounds here, for one because the problem isn't enormous. If it
doesn't get any better, "TYPE C:\AUTOEXEC.BAT" will keep working.
Other possible work-arounds are to not use the whole 80x25 screen, or
start with a 80x25 "logo" (just like some PM apps do) or use a graphic
mode. But this isn't about diving into Dive, and the original app (over
20 years old, a learning project port from memory) depends on 40x25.

Suffix "a": the equivalent of "MODE 40,25"
Suffix "b": the equivalent of "MODE 80,25"

Prefix "1": type MyApp.EXE in a fullscreen CMD.EXE session
Prefix "2": type MyApp.EXE in a VIO CMD.EXE session
Prefix "3": use a regular WPS file object representing MyApp.EXE (VIO)
Prefix "4": use my own WPS object representing MyApp.EXE (fullscreen)
Prefix "5": use my own WPS object representing MyApp.EXE (VIO)

Covered so far are the situations (prefix/suffix-notation) 1a, 1b, 4a,
4b and 5b. It's not an ugly looking issue w.r.t. 1a, 1b, 4a and 4b. In
case of 4b and 5b I use a parameter to skip switching back to 80x25.

Remaining: 2a, 2b, 3a, 3b, 4a and 5a. When I can detect PMSHELL is the
parent process, situation 3b is also covered (comparable with both 4b
and 5b, switching back to 80x25 is superfluous and can be skipped). I
guess situation 2b is unavoidable, I consider restoring the screen to
be best practice.

Remaining: 2a, 3a, 4a and 5a. The only reasonable approach indeed seems
to be a minimized switch to 40x25, followed by maximizing the session.
In theory it may perhaps also be possible to adjust the VIO font, but
if that would work it's a lot of overhead for "TYPE C:\AUTOEXEC.BAT".

One can do it with DosStartSession(), but the simpler way to start
developing is to do what I wrote:

start /win/min

Okay, I got the message. I'll start playing with START, hope to end up
with a good solution, and after that I'll start thinking about avoiding
to depend on START (I've experience with porting REXX apps to PM and/or
VIO output, but a PMREXX bug made those efforts useless because PMREXX
no longer returns PMREXX as the environment, so basicly I cannot select
between "SAY <output>" and/or "RxMessageBox <output>" depending on the
REXX Address()-environment used to run those dual-mode REXX apps :-/).

With perl, it is as easy as

perl -MOS2::Proc -wle "($proc) = proc_info; $ppid = $proc->[0]{ppid};
($pproc) = proc_info($ppid); print $pproc->[0]{module_name}"

but proc_info() involves a lot of parsing of output of
DosQuerySysState() under the hood...

Oh, when you'ld have to issue the command "MODE 132,43" to make it a
perl-one-liner here, it typically involves a lot of <...>! ;-)

I'll take a look at that API. It took a while to get a NewView-update,
I'm doing most of the work involved while travelling, and searching for
"parent process" just resulted in an overload of hard-to-read hits.
That's sorted out now, at least I hope so, so I'll look at this. And
when IMO the overhead becomes to huge, I can still decide to forget
about solving case "3b" (while preferring an API above parsing output
of PSTAT).

BTW, the app is finished, other than the problems mentioned above and
another (minor) novice detail. I could post it here, but an earlier
example is a better demonstration of the bad look of the switches:

/* VIO_DEMO.CMD */;DO i=80 TO 40 BY -1;"@MODE" i||",25";END i;EXIT

It may look better with a fast pc and an excellent video driver, but I
also keep less perfect hardware situations in mind. BTW, over 20 years
ago my next project back then was a state-of-the-art DTP app. There's
some progress going on, but I won't rewrite that app. IIRC part of the
fun used to be less than 3KB of memory for the BASIC app in a graphic
mode, 100% joystick controlled: I no longer own a joystick... :-)

Anyway, thanks for the input/pointers!



---
.



Relevant Pages

  • Re: [opensuse] KDE4.x.x Activities
    ... the leaving that app open switch back to your other activity via the ... Maybe the KDE team need a bit of a pokingto jiffy them up a little on ... SuSE Linux 10.3-Alpha3. ...
    (SuSE)
  • Re: Forms Creation Question
    ... Set Form2 as active form ... However, you better watch out when you switch between forms, ... MVP - Windows CE.NET, MCSD.NET, .NETcf consultant ... >> I show tons of instances of my app opened, only because a bunch of forms ...
    (microsoft.public.dotnet.framework.compactframework)
  • Update - How to prevent Hard Flicker present in Access database
    ... Switch back to the app, after I judge that the app has finished loading. ... AND it prompted a VISIBLE error. ... "Marshall Barton" wrote: ...
    (microsoft.public.access.modulesdaovba)
  • Re: How can I set focus to one of the running processes in the task list?
    ... I've got a list of running processes using opennetcf - how do I switch ... make sure the app uses CreateMutex and FindWindow to ... CreateMutex with the same mutex name to check whether the app is ...
    (microsoft.public.pocketpc.developer)
  • Re: Managed Asynchronous Pluggable Protocol and Threads
    ... > STA apartment (debugger shows ... HTTP APP calls you back on ... a worker thread that did not initialize COM at all. ... > Continue myself from my Switch method. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)