Official BS.Player forums  

Go Back   Official BS.Player forums > Main forum > Answered And Solved Questions

Answered And Solved Questions A good place to check before you post your question. All answered / solved posts are archived here.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 28th July 2017
Junior Member
BS.Player Newbie
 
Join Date: Apr 2017
Age: 26
Posts: 3
Rep Power: 0
UnknownName is on a distinguished road
Default Main Window Position and Movie Window Position

Hello guys,

I've got a little question. I've went into BSPlayer.xml configuration file and I've started to play with PlayWinPos (Movie Window position) and MainWinPos (Main Window Position). I've managed to change the location of these windows through the configuration file, but i can't seem to find the formula.

For example for value 39125179 the x = 603 and y = 187 and for value 28181034 the x = 436 and y = 554.

What i want ?
I'm trying to move the window through a network remote control through Android/iOS.
Reply With Quote
  #2 (permalink)  
Old 28th July 2017
Junior Member
BS.Player Newbie
 
Join Date: Apr 2017
Age: 26
Posts: 3
Rep Power: 0
UnknownName is on a distinguished road
Default

Ok. So, i'm going to answer my own question if somebody will be in need ever after this. After a lot of trial and error and some basic math i've found this :

using C# :

public void SetWindowScreen(Screen screen)
{
int PlayWinPos = ((screen.WorkingArea.X + X) * 65536 + screen.WorkingArea.Y + Y);
return PlayWinPos;
}

screen - it's the main screen or secondary screen
X - x position of top left corner of Movie Window
Y - y position of top left corner of Movie Window

Don't ask me why it's multiplied by 65536. Can't seem to find the connection between that value and screen resolution.

A moderator can close this thread.

Last edited by UnknownName; 28th July 2017 at 01:33 PM.
Reply With Quote
  #3 (permalink)  
Old 28th July 2017
Administrator
BS.Player Newbie
 
Join Date: Jan 2009
Posts: 3
Rep Power: 10
bst2 has disabled reputation
Default

It's 32 bit integer, HIWORD is x and LOWORD is y position of top left corner.

For ex.

Code:
position = 43254468  // 0x029402C4

x = 0x0294 -> 660
y = 0x02C4 -> 708

x = position >> 16;
y = position & 0xFFFF;

reverse:
position = (x << 16) | y;
Reply With Quote
  #4 (permalink)  
Old 31st July 2017
Junior Member
BS.Player Newbie
 
Join Date: Apr 2017
Age: 26
Posts: 3
Rep Power: 0
UnknownName is on a distinguished road
Default

Now it makes sense how they are calculated. Thank you.
Reply With Quote
Reply

Tags
main, movie, position, window

Thread Tools
Display Modes

Posting Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
some problems black_ps Bug Reports And Codecs 36 27th March 2009 06:28 PM
Main window position Lililita Bug Reports And Codecs 13 25th December 2008 09:44 AM
[FIXED] Remember last movie position for ALL movies bsplayer0 Bug Reports And Codecs 5 16th December 2008 11:36 AM
BUGS in BSplayer v2.12.941 (Normal/Pro) Tizio Bug Reports And Codecs 0 5th October 2006 06:43 PM
v1.2 won't remember movie window position durerca Bug Reports And Codecs 2 25th February 2005 06:01 PM


All times are GMT +1. The time now is 03:51 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
Ad Management plugin by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19