Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2010 Placing a shape in front of a picturebox (or an alternative)

$
0
0
Let's say I have a picture loaded inside a Picturebox. Let's say inside this picture we have a car, a book and a computer.
When i click or move my mouse over the car, book or computer something should happen. Let's say Form2.Visible = True

I was thinking about placing a shape in front of the picture like the OvalShape or RectangleShape.
It depends on the picture which kind of shape am gonna use. for a ball, indeed i will use the OvalShape
and for a car i am pretty sure to use the RectangleShape :)
I wanted to make that shape transparency and in front of the Picturebox then clicking or moving my mouse over it,
to make Form2 visible but whatever i do, it will be always in the background. Even if I put my shape inside a Panel
and put the Panel in front of the picturebox, i cant make it transparency, that nobody can see it.

I googled a lot and also read this one http://www.vbforums.com/showthread.p...oxes-and-ovals but nothing helped me to solve my problem. I read this comment somewhere
Quote:

You won't be able to put it in front of any "heavy" control (picturebox, TextBox).
after i read this one, i decided to ask here in this forum :)

The reason why i described my problem in detail is to hope for another solution if there is no solution for putting the shape in front of the picturebox, or even hoping for a better solution.
I am pretty sure we can just define the place in the Picturebox but even though, i am sure i would only able to define one pixel and not an area like a shape. Is it possible to define an area inside a picturebox and when we move or click with our mouse inside this area, something should happen liek form1.visibile=true?
Any suggestion or help for my problem?

I am using VB.Net 2012

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>