LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initialize Mouse error

Hello,

 

An error comes up when calling Initialize Mouse.vi. It only happens in some computers; I think it's ones with touch screen ability and no external mouse connected such as Windows Tablet PCs or Touchscreen laptops. When a USB mouse is connected and the VI or EXE is ran again, it works fine. The lvinput.dll used for this VI requires DirectX 8.0 or newer installed; computers with Windows 8 or 8.1 come with version 11 (run dxdiag).

 

The workaround I've found so far (connecting a USB mouse) is ok though the program we're creating is meant to run in portable situations with a Tablet so a fix to this issue would be great.

 

Attached are the project and an EXE you can use to check if it occurs in your computer(s). I suspect some will report it works fine but enough of us will run into this issue to justify a fix.

 

BTW, I saw an example of doing something similar with a .NET assembly flow to get the cursor handle but it shows why the lvinput.dll approach is a more elegant solution plus some people reported problems with that approach.

 

Thanks !

 

Download All
0 Kudos
Message 1 of 4
(3,994 Views)

You're trying to initialize a mouse that doesn't exist.  Why wouldn't this throw an error?  Are you adding code intended to initialize your GPIB device, that also doesn't exist, as well?  If not, you should be able to understand that it wouldn't make sense to "develop for a tablet" while initializing hardware you don't expect to be using.  Don't try to force a screw in with a hammer.  Use a tool that makes sense for the task at hand.

0 Kudos
Message 2 of 4
(3,939 Views)

Thanks for the input. I see the point - there's no mouse. Your observation leads me to think that perhaps the VI should be labeled Get Cursor Handle since what it does is monitor cursor activities (coordinates and actions). Not my intent to get into a semantics exchange but drive the point of the need of this functionality which I still believe can be served by this VI with a Windows PC that has no external mouse such as a touchpad or touchscreen. BTW, I've gotten it to work in most laptops (with or without an external mouse) but it fails consistently in others. 8=)

0 Kudos
Message 3 of 4
(3,907 Views)

On the tablets or computers were this VI produces an error does a device show up in the Windows Device Manager under "MIce and other pointing devices"?

0 Kudos
Message 4 of 4
(3,823 Views)