I could only find code using C#, but maybe someone can translate this into vb.net or assist with VB.NET code could that could help me. I'm only a beginner that worked with VB.net. I went to leadtools forums, but there is no example for what i want and most of the examples is written in only in C#
void HiliteWord(AnnContainer container, IOcrPage page, OcrWord word)
{
// Get bounds of word as LeadRectD
LeadRectD bounds = word.Bounds.ToRectangle(page.DpiX, page.DpiY).ToLeadRectD();
// Convert to annotation coordinates
bounds = container.Mapper.RectToContainerCoordinates(bounds);
// Create the annotation
AnnHiliteObject hilite = new AnnHiliteObject();
hilite.Points.Clear();
hilite.Points.Add(bounds.TopLeft);
hilite.Points.Add(bounds.TopRight);
hilite.Points.Add(bounds.BottomRight);
hilite.Points.Add(bounds.BottomLeft);
// Add to container
container.Children.Add(hilite);
}