Verdrax,
I tried this our and it seemed to work correctly. Here's the small section of code that I used (you'll have to put the coordinates of max, min, imax, and imin to your code):
Dim max As Variant, min As Variant, imax As Variant, imin As Variant
CWGraph1.Annotations.Add
Set CWGraph1.Annotations(1).Plot = CWGraph1.Plots(1)
CWGraph1.Annotations(1).Name = "Minimum"
CWGraph1.Annotations("Minimum").Shape.Type = cwShapeRectangle
CWGraph1.Annotations("Minimum").Shape.XCoordinates = Array(min, max)
CWGraph1.Annotations("Minimum").Shape.YCoordinates = Array(imin, imax)
If that doesn't work for you, please let us know.
Regards,
Shannon R
Application Engineer
National Instruments