Solved

Paint  and clean overlay in a picture box.

Posted on 2014-10-20
4
136 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 250 total points
ID: 40391617
0
 
LVL 23

Accepted Solution

by:
Snarf0001 earned 250 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
TCP Chat/GPS application security thru firewall 4 51
array not updating 8 40
Telerik RadEditor Control Save 8 36
Example code 13 36
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

738 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