Mayayana,
Post by MayayanaPersonally I've never made a call to GetStartupInfo.
Neither do I, as, as I mentioned, you can change the size of the window
*without* changing its current minimized (or maximized) state.
Im other words: you (as the programmer) need to *explicitily override* the
windows current state (minimized for our story) to get the problem your
script attempts to fix.
Post by MayayanaI don't write software that people want to be minimized at open,
Wrong attitude I'm afraid. Its not *your* choice what "the people want",
its *theirs*. A user starting your program by way of a shortcut and
selecting it to be minimized (or maximized) should be honored, not ignored.
Post by MayayanaSo you can rant about how they don't follow what you
think the rules should be, or you can deal with the real
world situation.
Your "real world situation" consists outof dealing with programmers who
willfully disregard the behaviour thats selected -- by the user! -- in
favour of whatever they, as the programmers, think should *always* happen.
I agree that its possible that some programmer will let his arrogance get
the better of him (or simply not thinking further than his nose is long) and
he includes code to do just that. but to go live your life as if that
behaviour is standard instead of the deviation isn't the way to go. You're
just needlessly making solutions much more complex than called for (which
was all I initially tried to convey).
I just checked VLC player, and it indeed disregards my selection to either
start minimized or maximized. Nice. That means that when you use it to
play a (background) song you *always* have to minimize that window. I don't
think the programmer ever thought of that situation. So much for the "I
know what the real world needs" attitude of that programmer I guess .... :-D
Post by MayayanaI'd generally agree, but this is hardly standard behavior.
lol. Its the same for all versions of windows, and you need to *activily
override it* inside your program to get a different one. I don't know
about you, but for me that looks to be a good definition of "standard",
don't you think ?
Post by MayayanaIt would be very rare for people to even know they can set
window size in a shortcut.
You're trying to argue that beause, according to you, not many users know
that there is a possibility to change the startup style of a program it
isn't can't be regarded to be a default behaviour ? Really ? :-|
Post by MayayanaWhat's much more relevant for most people is to open in the
way the program was closed.
My, my. You aren't trying to refer to some *default behaviour*, are you ?
I mean, you made it rather clear that you do not believe in such a thing
.... :-D
And no, you're wrong (as you probably well know). Minimize (or maximize)
a program and than close it. Its *default behaviour* is to open windowed
the next time you (double-)click the executable (and no, a programmers
choice to override that default behaviour doesn't make it less default).
And I do not know if you are aware of it, but you've been talking about two
things in the same thread, withouth even an indication of if you are aware
of it:
1) is there a default behaviour and should a programmer be allowed to
override it (and if you think so, why -- hint: see my VLC example.).
2) should a programmer (be allowed to) just ignore a users explicite
settings (As far as I'm concerned, no).
Regards,
Rudy Wieser
Post by Mayayana| It
| already received it (IIRC by way of its "startupinfo" record.
The program receives it if it calls GetStartupInfo at
startup. It could then act according to the received info
if that's deemed relevant. If there's reason to think
someone might be loading your software from another
process and might want to control the window size/position
at startup, then you might want to check that.
Personally I've never made a call to GetStartupInfo. I
typically record the window position at close so that it
can open where the person probably likes it to be. With
single-window freeware I usually just show a fixed-size
window center-screen. I don't write software that people
want to be minimized at open, and I see no reason to
code a lot of window positioning functionality for software
that will never need it.... especially if no one is paying
me for that.
A quick check on my system shows that many programs
do call GetStartupInfo and act accordingly. Paint Shop Pro 5,
IrfanView and Filzip all started minimized. On the other hand,
VLC media player, Regmon and Sumatra PDF reader did not.
(The author of Regmon, Mark Russinovich, is a top Windows
programmer who lectures at Microsoft seminars.)
So you can rant about how they don't follow what you
think the rules should be, or you can deal with the real world
situation.
| > So if a program does anything at startup to adjust its
| > window it may bypass that action.
|
| If-and-when that happens than whomever created that program should get a
| quick kick-to-the-behind, as he's interfering with the expected standard
| behaviour.
I'd generally agree, but this is hardly standard behavior.
It would be very rare for people to even know they can set
window size in a shortcut. Even when they do, it would
be very rare for that functionality to be relevant. What's
much more relevant for most people is to open in the way
the program was closed.