Link to home
Start Free TrialLog in
Avatar of Hawkvalley1
Hawkvalley1Flag for United States of America

asked on

ControlPaint.FillReversibleRectangle

Hi am looking to try to get a similar look to the windows mousedown rectangle you see in Vista on the desktop. Semi-translucent light blue rectangle. I have tried this in the mousemove event - (r) being the updated points:

Dim color As Color = Color.FromArgb(30, 0, 200, 255)
ControlPaint.FillReversibleRectangle(r, color)

Other ideas? I am an advanced-beginner in GUI+ , thanks for the help...
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Where are you trying to get this?...on your form?...or on the desktop too?
Avatar of Hawkvalley1

ASKER

On my picturebox - winforms, sorry I missed that. VB 2008.
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
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
Yes that's it. I had to adjust the startPT and endPT with PointToScreen coordinates, but it works great. I want a crisp edge for it so I'll work on the paint event for it to draw a border - see if that will work. You have always have a great mind for things like this - no pun intended LOL.
   

Yeah...you should be able to pop something pretty easily into the paint event to get a border.  =)
Thanks again.
This made a very crisp border!

ControlPaint.DrawReversibleFrame(sf.Bounds, Drawing.Color.Black, FrameStyle.Thick)

Painting one was not as crisp due to the opacity.