Author Topic: Possible to specifiy window open locations on screen.  (Read 4459 times)

0 Members and 1 Guest are viewing this topic.

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Possible to specifiy window open locations on screen.
« on: May 19, 2018, 11:29:45 am »
The program starting location can be specified in windows, once the exe is created.  So every time the program starts it goes to the same spot.
I have need to specify where other windows locations start.  IE: shelling out to cmd, $console and such.

Proposal: Instead of just $console and a window pops up somewhere.  $console (125,200) would open a console with the upper left corner at PEL location 125,200
instead: shell "something to run".  shell locate(125,200), "something to run".
and if possible "cls (125,200)"  would do the same as above.

I just hate to relocate windows every time I start a program with multiple windows.
I have experimented with changing locations.  But widows is dumb, it will locate all consoles and such to the same spot.  Irrelevant to which program started it.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Possible to specifiy window open locations on screen.
« Reply #1 on: May 19, 2018, 01:03:27 pm »
Hi doppler,

You know about _SCREENMOVE right? Though it wont work with Windows Windows, I don't think.

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Re: Possible to specifiy window open locations on screen.
« Reply #2 on: May 19, 2018, 03:49:38 pm »
_screenmove is good for the main program window.  Does nothing (i can find), about the console window mov'in it.

Still a problem with shell cmd windows moving them around.

There is a program called "cmdow".  re: https://ritchielawrence.github.io/cmdow/  It's a real hassle to work out.
You got to really know, where, what, and when.  With how and why.  To work it properly.  Like I said: a real hassle.

I just use it to min and max shelled cmd's into and out of the task bar.  (unclutter the desktop).

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Possible to specifiy window open locations on screen.
« Reply #3 on: May 21, 2018, 12:50:39 pm »
I don't know of any command prompt switches that size or place windows. Windows OS is designed to try to remember the size, which it does fairly well, and sometimes the location it opened up last, but it does that poorly. I'm just re-iterating what you already know about the erratic behavior and yes, it would be great if something could be developed to control size and placement of shelled windows programs.

Have yo checked to see if there is any 3rd party software that already does this? If so, it might be possible to shell what you want opened as a command parameter to that 3rd party software, and have it open the widow in the desired size and location. I searched and found this: http://www.desksoft.com/WindowManager.htm

Also, I have heard that holding the shift key while you resize it, place it , and then close it "sometimes" helps Windows remember better to duplicate that size and location on the next use.

Pete
 
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Re: Possible to specifiy window open locations on screen.
« Reply #4 on: May 23, 2018, 07:39:04 am »
Well this is what I have found so far.  This is a common question if you google it.  Nobody has a real answer except using special scripts, and personal programs (making internal window interface calls).

What does work and is suggested is CMDOW.  But there are some limits.  CMDOW can see, get sizes and move around windows all of them except a QB64 console window.  I am assuming since the console window is a child process of QB64 compiled program it is seen as one screen task.  And therefore is moved together or not using CMDOW (assuming have not tested).

I would love for this to happen naturally within QB64.  Since I am the only one looking for it, it won't happen.  I am forced to use CMDOW, as best as possible (with it's limits).