I use the picture control when I want a mouseover effect. The control has a mouse attribute that you can monitor in a while loop, when the attribute = -1 the mouse isn't over the control, so you can wire your original picture. when it isn't = -1 (mouse is over control) you can wire new picture. there is also a 'button down' attribute, so when mouse is clicked you can call other vi, etc. as well as display a third image if you want one for when button is clicked. one suggestion, read images first to avoid delays.
"X3aD" wrote: >Is it possible to do a mouseover type function in Labview where when the>mouse is over a button that a certain picture can be displayed. Thanks.>>Dewayne>>
"patrick sincebaugh" wrote in message news:firstname.lastname@example.org... > I use the picture control when I want a mouseover effect. The control has > a mouse attribute that you can monitor in a while loop
I have done similar and was about to post it, but saw yours first..
In my experience this EATS through processor time. Any picture indicator displays or probes tend to be very very slow in my experience. I'd love to know how to speed these things up somehow. Not sure if I'm simply experiencing slow communication with video drivers/hardware etc, but I tend to have a couple hundred MS latency writing to the indicators and under a hundred trying to read the attribute nodes.
I have just read my reply to Dewayne and thought it a bit brief.
The files mouse13.zip contains an excellent vi called mouse magic. It is a small file that uses a DLL to return the mouse position, relative to the screen, and which mouse button pressed. To make the absolute mouse position relative to its position in the window you have to use vi server to find the window's origin and bounds. To know if the mouse is over a control you have to check the mouse position to see if its relative position is over the control area. The control area is is found using the controls origin and bounds attributes.
Hope this is more helpful
p.s. sorry about the repeated message.
Timothy John Streeter wrote:
> Hi Dewayne > > There is a mouse libr ary in the info-labview ftp site. > > ftp://labview.pica.army.mil/pub/labview/vi/lv4/ > > the file name is: > > mouse13.zip and mouse13.txt > > Tim > > X3aD wrote: > > > Is it possible to do a mouseover type function in Labview where when the > > mouse is over a button that a certain picture can be displayed. Thanks. > > > > Dewayne
>Is it possible to do a mouseover type function in Labview where when the >mouse is over a button that a certain picture can be displayed. Thanks. >
You can get the bounds of an object via an attribute node, and the mouse coords from freely available vi's.
Place a picture control behind the button and return the attribute node property called MOUSE. It returns the coordinates of the mouse relative to the control ((0,0) ... (x,y)) and (-1,-1) if outside the picture.
Alexander C. Le Dain, PhD ICON Technologies Pty Ltd http://www.icon-tech.com.au