Hi Nigel,
The position and size of the annotation are not updated for the MouseMove event (IEVolution .Net v8.0.0.0).
I can't query in real time with mouse move. :(
public partial class Form1: Form
{
private IEObjectLine ieobjectline;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
ieobjectline = (IEObjectLine)ieViewer1.Image.Annotations.GetTemplateObject(IEObjectType.Line);
ieobjectline.Name = "Line";
ieobjectline.Left = 0;
ieobjectline.Top = 100;
ieobjectline.Width = 200;
ieobjectline.Height = 1;
ieobjectline.Transparency = 255;
ieobjectline.PenWidth = 1;
ieobjectline.PenColor = new IERGB(Color.Black);
ieobjectline.PenStyle = IEPenStyles.Solid;
ieViewer1.EnableObjectInserting = IEViewer.ObjectInserting.Line;
}
private void ieViewer1_MouseMove(object sender, MouseEventArgs e)
{
if (ieobjectline != null)
{
Console.WriteLine(ieobjectline.Left.ToString() + ", " + ieobjectline.Top.ToString() + ", " + ieobjectline.Width.ToString() + ", " + ieobjectline.Height.ToString());
}
}
}
I have a remark:
The "ieViewer1.Image.Annotations.SelectedObjectsCount" property correctly returns the number of annotations selected, but the
'ieobjectline' "Selected" property does not work, its value is always false if the annotation is selected, if not.