?
Solved

Paint  and clean overlay in a picture box.

Posted on 2014-10-20
4
Medium Priority
?
152 Views
Last Modified: 2015-06-09
Hello.
On a form I have:

A picture box with a drawing with position texts.
I also have a ListView with objects telling the location of the
texts in the picture.
For example;
MyObject.Text
MyObject.XLeft
MyObject.XRight
MyObject.YTop
MyObject.YBottom

When I select an item in the listview, I want to (based on the object)
draw a rectangle  around the Text in the picture.
(IE based  based on XLeft,XRight,YTop and YBottom  values.)
When I select another item, I want  to draw a box around that
text in the picture (and clear the old rectangle)

Can someone help me out with that?
0
Comment
Question by:pucko73
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 2

Expert Comment

by:Glen Richmond
ID: 40391479
Think you may need some form of OCR ocx to detect the Text on the image, as it not realy text but part of the Image.
0
 

Author Comment

by:pucko73
ID: 40391492
I know the location of the text.

It's in MyObject  (both the coordinates and the text it self)
0
 
LVL 2

Assisted Solution

by:Glen Richmond
Glen Richmond earned 1000 total points
ID: 40391617
0
 
LVL 23

Accepted Solution

by:
Snarf0001 earned 1000 total points
ID: 40391841
You should probably handle the Paint event on the picturebox, and inside check for the cords of the selected listview item (if any is selected), and call e.Graphics.DrawRectangle(...) accordingly.

Note that you may also have to call Invalidate() on the picturebox control when the selecteditem of the listview changes, so it can trigger the GUI update.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question