Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

CONSIZE command in Vince's 4console.dll

May
3,515
5
Vince:
I like the ability of the CONSIZE command to change the visible size of a window (/w). However, it also moves the top left corner of the window to the top left corner of the screen. Adding "/R 0 0" to the CONSIZE command made no difference. How do I keep the window's upper left corner anchored?

The reports below use parsed values from TCC's internal @winpos, _columns, _rows, and 4console.dll's _wincols and _winrows.

Original:
Window type: normal at T: -10, L: 1, B: 694, R: 1027
Window size: 142 x 56
Visible: 142 x 56

Command:
consize /w 142 57

After command:
Window type: normal at T: 0, L: 0, B: 716, R: 1026
Window size: 142 x 57
Visible: 142 x 57
--
Steve
 
On Wed, 19 May 2010 07:19:01 -0400, Steve Fábián <> wrote:

|How do I keep the window's upper left corner anchored?

You can't (unless I change something). If CONSIZE thinks (correctly in your
example) the console is off the work area it will move it. The code is
complicated. The only things I reasonably could do are

1. move it only when /P(osition) is specified
2. add a /S(tationary) switch (easy)
3. let /P(osition) accept negative numbers

1 & 3 together would be fairly easy and simplify the code a lot. I don't know
how others would like that.
--
- Vince
 
Just for you, Steve ... I added a /S(tationary) switch to suppress the automatic move. It doesn't appear in the help. It's only in the 32-bit version. New 4console.zip on lucky.syr.edu in 4plugins.

On Wed, 19 May 2010 07:19:01 -0400, Steve Fábián <> wrote:

|How do I keep the window's upper left corner anchored?

You can't (unless I change something). If CONSIZE thinks (correctly in your
example) the console is off the work area it will move it. The code is
complicated. The only things I reasonably could do are

1. move it only when /P(osition) is specified
2. add a /S(tationary) switch (easy)
3. let /P(osition) accept negative numbers

1 & 3 together would be fairly easy and simplify the code a lot. I don't know
how others would like that.
--
- Vince
 
| Just for you, Steve ... I added a /S(tationary) switch to suppress
| the automatic move. It doesn't appear in the help. It's only in
| the 32-bit version. New 4console.zip on lucky.syr.edu in 4plugins.

thanks!

| ---Quote (Originally by vefatica)---
|| On Wed, 19 May 2010 07:19:01 -0400, Steve Fbin <> wrote:
||
||| How do I keep the window's upper left corner anchored?
||
|| You can't (unless I change something). If CONSIZE thinks (correctly
|| in your
|| example) the console is off the work area it will move it. The code
|| is
|| complicated. The only things I reasonably could do are
||
|| 1. move it only when /P(osition) is specified
|| 2. add a /S(tationary) switch (easy)
|| 3. let /P(osition) accept negative numbers
||
|| 1 & 3 together would be fairly easy and simplify the code a lot. I
|| don't know
|| how others would like that.
|| ---End Quote---

1 and /S are equivalent, though I prefer 1, which makes "stationary" the
default.
3 I expected to be already since all TCC commands with /POS accept negative
values for L and T, and I suspect (though haven't tried) even for R and for
B as long as the values are more positive and L and T, resp.

BTW, I make L and T slightly negative at times so that the left window frame
and the title bar occupy less of the visible area, leaving more space for
the text. Just enogh to be able to discert window title.

Is there a way to dynamically change the colors of the title bar (background
and foreground)? I know I can't do it with X3.64 color commands (as I do in
my prompt), because they are interpreted only by TCC, and then only in
STDOUT and STDERR.
--
Steve
 

Similar threads

Back
Top