Check out the LabVIEW demo found in your LabVIEW install folder. e.g. a normal install under windows places it at:
C:\Program Files\National Instruments\LabVIEW 7.0\examples\general\uievents.llb\Draw Graph with Events.vi (Or search for e.g. "mouse" in the Example Finder. The VI is "Draw Graph with Events.vi".
