Video Player Double Tab Resize

I’m having an issue with a video player that is part of a much larger UI on a touch screen. When the user double-clicks on the video it’s resizing it to take over the screen. Is there a way to prevent this from happening?

Here you go Bob, its the only way I could think of doing it.

https://www.dropbox.com/s/zf66h43ergfex1s/TestMouseTrap.xojo_binary_project?dl=1

It could use some checks if the window is in the front but apart form that it should be good in both 32bit/64bit.

That looks like it’s working, thanks Julian! I was looking into using OLEObject and capturing the event, but it was looking bleak as there wasn’t a way to prevent the full screen from happening in that event.

Just a heads up, in the current release version of Xojo (2018r2) the POINT structure conflicts with REALBasic.Point

Just tidied it up a little.

Yeah I was trying all sorts of ways around it, none seemed to be getting in the way of the double click, it seems super low level inside the player.

I couldn’t get it to moan about POINT.

Lucky you! I just wanted to inb4 someone complained :stuck_out_tongue:

Thank you again for your help!

Definitely appreciate the help! Been out of town for a week so sorry for the delay in testing this.

It works in the demo app but when I create a MoviePlayer subclass with the same details it does not work. It never recognizes the MouseButton press in MouseButtonHook. So there’s something weird when it goes into the subclass.

I don’t know how much effort it’s worth to figure it out. I’m already using OverlayMBS to capture mouse clicks on a fullscreen video so I can do the same technique on the smaller videos (thankfully only 1 video on a window) to ignore the mouse clicks I should probably have remembered that I was doing this before posting to the forum.

If you moved MouseButtonHook into the class then you’ll need to change it to a Shared Method or the values of the parameters passed into that Method are corrupt and the button clicks won’t register, see https://forum.xojo.com/50265-serious-problems-with-windows-callbacks for more info.