![]() |
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. |
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. |
It's 32 bit integer, HIWORD is x and LOWORD is y position of top left corner. For ex. Code: position = 43254468 // 0x029402C4 |
Now it makes sense how they are calculated. Thank you. :teeth: |
All times are GMT +1. The time now is 10:49 AM. |
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
Ad Management plugin by RedTyger