Preventing mouse double-click in Activex control

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
freckleback

Preventing mouse double-click in Activex control

Postby freckleback » 04 May 2006 19:30

Does anyone know of a way to prevent a mouse double-click event from reaching VLC Activex hosted in IE which causes it to go to full screen?

Also, is there a way to be notified of a single click on the VLC activex control when used in IE? Event handler possibly?

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 05 May 2006 10:53

Does anyone know of a way to prevent a mouse double-click event from reaching VLC Activex hosted in IE which causes it to go to full screen?
This behaviour is currently hard-coded in VLC video output module, so at the moment you can't control it through the ActiveX control
Also, is there a way to be notified of a single click on the VLC activex control when used in IE? Event handler possibly?
no there either, that's on my TODO list

Fritivi

Postby Fritivi » 07 May 2006 18:25

The only solution at the moment is to use a mouse hook, i did it and it works well :)

Fritivi

Postby Fritivi » 07 May 2006 18:26

ooops sorry i didn't notice the "in IE" ... then you have no solution ...

MrExNice1979
Blank Cone
Blank Cone
Posts: 46
Joined: 25 Apr 2006 14:11
Contact:

Postby MrExNice1979 » 09 May 2006 09:16

@ frivity, what is a mouse- hook, ??? sorry but my english is not so good, can you tell me what it is and what it does :?: :wink:

Fritivi

Postby Fritivi » 10 May 2006 19:14

Mouse hook is used to intercept mouse messages before they are sent to a window or an application.

In this case I intercept the double click messages that vlc is supposed to receive to launch my own full screen mode. I also intercept simple clicks with right and left buttons so I can drag the window with the mouse.

Arno

Postby Arno » 16 May 2006 14:01

@Fritivi

I understand the principle of hook. What I don't seem to understand, is how to get it to work in c# (What language are you using?) - I woul appreciate very much if you would give me a hint how I can do this (code snipet) - or wich dll i need to "ask" ....

Best regards
Arno

Fritivi

Postby Fritivi » 19 May 2006 10:31

I use Delphi, so I cannot give you any C++ examples.

You have to use the SetWindowsHookEx API function to declare the hook. As you need a global mouse hook (else you won't get the mouse messages before the vlc active x) you have to use this function and the hook callback function in a dll and not in your exe. It's in this function that you'll treat the mouse messages.
The simple way to do it is to forward every "interesting" mouse message to your application, and to check if you're over the vlc active x client area or not so you can decide if you forward the mouse message to it's destination window or not.

This is a very "basic" explanation of how i did it, but i think you can find a lot of C++ mouse hook examples on the web with detailed explanations, google is your friend ;)

gabi333

Postby gabi333 » 19 May 2006 16:42

Same problem here, I tried some sort of hooks already, but it seems that I made something wrong, since it's still going in full screen mode.

Fritivi, even a Delphi code snippet would be much appreciated (we can translate it into c# afterwards) ;)

Fritivi
New Cone
New Cone
Posts: 5
Joined: 24 May 2006 10:01

Postby Fritivi » 24 May 2006 10:09

Ok Gabi, i'll try to paste some code here this weekend.
http://fritivi.free.fr ... merci VLC ! :D

GreenEnvy
New Cone
New Cone
Posts: 3
Joined: 21 Jan 2010 18:44

Re: Preventing mouse double-click in Activex control

Postby GreenEnvy » 01 Apr 2010 18:38

I know this topic is very old, but I thought I'd add this tip.

I don't know if you can do the equivalent on a webpage, but in vb.net, using the VLC activeX control, I also needed to prevent double click.
To do this, I simply placed the VLC control in a panel or groupbox control, and set the enabled status of that panel or groupbox to false.

Now you can still see the vlc window, but since it's parent container is disabled, it does not accept mouse clicks.

BugHunter
New Cone
New Cone
Posts: 4
Joined: 08 Feb 2010 21:16

Re: Preventing mouse double-click in Activex control

Postby BugHunter » 06 May 2010 00:25

Thanks GreenEnvy, was looking for a solution and yours did the trick for me!


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 19 guests