02-25-2015 12:04 PM
I have multiple Y-scales on my Waveform Graph. I have added a standard Windows Forms Label on top of the graph that I want to "link" to my cursor. I want the label's XY location to follow the cursors's XY location. This label is to display the name of the Y-Scale that the user has selected the cursor for. Here is what I have:
Private Sub blueCursorChanged(sender As Object, e As EventArgs) Handles pinkCursorPt.PropertyChanged Dim x As Integer, y As Integer x = pinkCursorPt.XPosition y = pinkCursorPt.YPosition lblPinkCursor.Location = New Point(x + 20, y + 20)
This code appears to be moving the label fine, but moving it to the forms XY coordinates and not the XY coordinates of the cursor on the graph. Can someone provide guidance? Attached are screenshots of what I want to accomplish, and what my current code is doing after execution. Can someone provide guidance please. Thanks
02-26-2015 10:01 AM
Hi DM@Means,
I would take a look at the following links for some help getting started.
http://www.ni.com/example/2820/en/
Best wishes!