Link to home
Start Free TrialLog in
Avatar of Dov_B
Dov_B

asked on

how can I highlight part of an image in a picturebox

I have an image displayed in a piturebox I would like to place a semitransparent yellow square over a portion of the image to high light it I want the image to be visible under the highlighter how?
vb.net 2008 express
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Is the yellow square "dynamic"?...that is to say does it need to be moved around?
ASKER CERTIFIED SOLUTION
Avatar of MTEXX
MTEXX
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dov_B
Dov_B

ASKER

the square does need to be dynamic
I need to
move it
resize it
make it disapear
Move it via CODE or let the USER move it around?
Do you need assistance with moving or sizing the rectangle?

Of course, disappearing simply involves not calling the highlight code.

Avatar of Dov_B

ASKER

I need the user to be able to move it then I will save the coordinates in a database and have  the code move it there automaticly
I also need to turn the highlite on and off and back on again at different times
and finaly although this is my last priority in case you dont have time for all my questions I would like the user to be able to resize the box
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dov_B

ASKER

dear Idle mind
I would prefer to use some code you gave me before at
http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_23970712.html
could you tell me how to progromaticly change the size and locations of a rectangle I drew with that code
I prefer it over the use of forms
Thank you
If you want to use that code then you just need to use a Color with an Alpha channel set as MTEXX demonstrated earlier:

    Dim highlightColor As Color = Color.FromArgb(196, 255, 255, 0)

Avatar of Dov_B

ASKER

thank you I am laying these rectangles over a very large bitmap that scrolls how can I get the rectangles to cover the same part of the bit map in case I scroll it up or down?
In other words how can I get the rectangle to scroll with the image?
 
I'm on vacation at the moment and won't be back home until this weekend.  I'll play with it then...