LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

autochanging of control

Hello, All!
Is it possible in LabVIEW 6 - to make a control picture changing when mouse
pointer placed over it?

--
Sergey Yakovlev, Berlin,
yakovlev@evologics.de
0 Kudos
Message 1 of 5
(3,008 Views)
You can use Win API functions to get position of mouse pointer. Few days ago here was an answer with description where you can get Win API toolkit for LV. But in any case you can use windows DLLs to do it (User32.dll void GetCursorPos(POINT FAR* lppt)).
Then you have to get the positions of your picture control with the help of its Property Node and check if the pointer is inside this region.

Oleg Chutko.
0 Kudos
Message 2 of 5
(3,008 Views)
??!
This way is known and good when you have a small amount of controls and all
controls are fixed in positions on panel. My task is more complicated and
I'd like to find more intelligent solution.



"Oleg" wrote in message
news:5065000000050000006B540000-1007855737000@exchange.ni.com...
> You can use Win API functions to get position of mouse pointer. Few
> days ago here was an answer with description where you can get Win API
> toolkit for LV. But in any case you can use windows DLLs to do it
> (User32.dll void GetCursorPos(POINT FAR* lppt)).
> Then you have to get the positions of your picture control with the
> help of its Property Node and check if the pointer is inside this
> region.
>
> Oleg Chutko.
0 Kudos
Message 3 of 5
(3,008 Views)
May be most inteligent is LabVindows/CVI with libraty Run-Time Moveble
control and all UI
indeed.

"Sergey Yakovlev" wrote in message
news:9vi83n$t7r$1@mamenchi.zrz.TU-Berlin.DE...
> ??!
> This way is known and good when you have a small amount of controls and
all
> controls are fixed in positions on panel. My task is more complicated and
> I'd like to find more intelligent solution.
>
>
>
> "Oleg" wrote in message
> news:5065000000050000006B540000-1007855737000@exchange.ni.com...
> > You can use Win API functions to get position of mouse pointer. Few
> > days ago here was an answer with description where you can get Win API
> > toolkit for LV. But in any case you can use windows DLLs to do it
> > (User3
2.dll void GetCursorPos(POINT FAR* lppt)).
> > Then you have to get the positions of your picture control with the
> > help of its Property Node and check if the pointer is inside this
> > region.
> >
> > Oleg Chutko.
>
>
0 Kudos
Message 4 of 5
(3,008 Views)
Yakovlev;

There is a work-around to do that by using a picture control. The picture control has a property for mouse position.

In LabVIEW's Help, check the example "Mouse Control" located in "Picture Control Examples". There is also an example in Developer's Zone:

Using the Picture Indicator to Assign Mouse Events to a Front Panel Object

Regards;
Enrique
www.vartortech.com
0 Kudos
Message 5 of 5
(3,008 Views)