Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 06 SEP 1999 09:34:27PM Jo Peoples wrote:

Oh, and another thing: Is there a way you can make a window (either a form or the called window of another app) appear where you want to? For instance a form called from another form (by button), or another app like the mediaplayer? I might want to have these appear in the top left corner or centre screen.

Jo


At 06 SEP 1999 11:05PM Donald Bakke wrote:

Jo,

Use the SIZE property to reposition and/or resize a window. You will want to have your window be invisible during design time and then use the SIZE property to position the window where you want it to be. The SIZE property automatically makes the window visible. This way the end user won't see the window open up in one location and then quick move to another.

[email protected]

SRP Computer Solutions


At 07 SEP 1999 03:15AM Oystein Reigem wrote:

Jo,

See http://www.revelation.com/WEBSITE/DISCUSS.NSF/f12696d31000b22a8525652b00831bb2/1a3188fe634d139a852566f60039904b?OpenDocument for my version of a function that positions a window at startup.

- Oystein -


At 08 SEP 1999 09:33PM Jo Peoples wrote:

Fantastic, Oystein! It answers all my queries, but one. The SIZE code etc needs to be put in the CREATE event, which means it works for OI windows. What about the window of another app? Ie: calling mediaplayer to play an avi file. Can you code where you want the video window to appear?

BTW I think this list is great. I know I ask some dumn questions at times, but at least I can ask them and people like you are tolerant enough to answer them! The world has not completely gone to the dogs as yet.

Jo


At 09 SEP 1999 05:11AM Oystein Reigem wrote:

Jo,

…The SIZE code etc needs to be put in the CREATE event, which means it works for OI windows. What about the window of another app? Ie: calling mediaplayer to play an avi file. Can you code where you want the video window to appear?

That's the kind of question you might need really hardcore programmers like Carl Pates for. :-)

There must certainly be a Windows API function one can call to change the SIZE/location of any window, also the mediaplayer window. But there are two possible problems.

Firstly, the mediaplayer window will make a noticable jump on the screen, because it's already visible when it gets moved.

Secondly, your mediaplayer window might already be busy playing when you try to move it. I don't know enough about this to say if that's a problem. A workaround would be to start mediaplayer without the /play parameter, then move it, and finally issue MCI commands to the mediaplayer to play and close the video. Richard Bright's http://www.revelation.com/THEWORKS/OIdiscuss.nsf/ef8405490de3608f85256700005245e4/97B343CDA2142B12852567DE007170CD?OpenDocument posting has some stuff on using MCI.

There might be a different solution. Notice that when you start mediaplayer (or any of a great number of other apps) the window appears in its last location (where it was when you closed it last time). That location information must be stored somewhere (in the old days it used to be in ini files), and perhaps your app can change it before it starts the mediaplayer.

- Oystein -

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/0d236bf2cd13b7a7852567e50008a5dc.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1