kaharas
kaharas

Reputation: 607

Shockwave Flash Object doesn't support MouseWheel Event

I've a Windows Form Application that does a simple task : the user selects a video in the main form, and the application pops up a new form with a Shockwave Flash Object reproducing it.

What i would like to do now is to move in the Movie timeline when the user scrolls the mouse wheel. The problem is, the Flash object steals the focus from the form as soon as it pops up, and it doesn't support a mousewheel event.

Is there a way to do it, other than hooking the MouseWheel event and redirect it to the application when the popup has the focus?

Upvotes: 3

Views: 474

Answers (1)

Hans Passant
Hans Passant

Reputation: 942255

The window displayed by Flash is owned by a different process. That makes messing with messages difficult, you'll at least need a low-level mouse hook to see the mouse message before it disappears into the other process.

The boilerplate code is available here. Beware that it has a bug that prevents it from working on .NET 4 and up, see this answer for the workaround.

Upvotes: 2

Related Questions