Jump to content

Mouse Wheel Event in XControl


Recommended Posts

Hi,

I just want to do a simple XControl with a Labivew picture. The only feature I want to add is the possibility to use the mouse wheel to zoom the picture.

I have seen an example (http://forums.lavag.org/Mouse-Wheel-Scroll-Event-t148.html) where you can read the wheel status and behave accordingly but I think that example is not suitable for XControl because it requires a continuously running loop.

Any clue?

Link to comment

QUOTE (LuPo @ Jul 25 2008, 02:01 AM)

Any clue?

Yes,

in your init ability load a VI dynamically, this dynamic VI runs continuously and checks the wheel mouse.

In the init state you also create a user event, this is fed to the dynamic VI, also create a dynamic event registration. This registers for the user event, and is linked to the event structure of the facade ability.

In the close ability you kill the dynamic VI, unregister the event registration and the user event.

Ton

Link to comment
  • 5 weeks later...

QUOTE (Ton @ Jul 25 2008, 07:59 AM)

Yes,

in your init ability load a VI dynamically, this dynamic VI runs continuously and checks the wheel mouse.

In the init state you also create a user event, this is fed to the dynamic VI, also create a dynamic event registration. This registers for the user event, and is linked to the event structure of the facade ability.

In the close ability you kill the dynamic VI, unregister the event registration and the user event.

Ton

Thanks, that helps alot.

Link to comment

QUOTE (Ton @ Jul 25 2008, 12:59 AM)

Yes,

in your init ability load a VI dynamically, this dynamic VI runs continuously and checks the wheel mouse.

In the init state you also create a user event, this is fed to the dynamic VI, also create a dynamic event registration. This registers for the user event, and is linked to the event structure of the facade ability.

In the close ability you kill the dynamic VI, unregister the event registration and the user event.

Something else you may decide to look into are the ActiveX callback functions.

You can actually wire a LV control reference into the reference node, but I don't know how this will work w/ XControls.

A very interesting segway into something very different.

I'll see what I can whip out if I get the chance.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.