pictureboxes and ovals, want ovals to be in front of pictureboxes
I am creating a photo hunt game for grades 6-9 in summer camp. I want them to alter an image in paint then create two picture boxes. I want to put in ovals with no fill color to mark the differences in the picture but VB.net won't let me send the images behind the ovals. this should be a very simple solution but can't find it. thanks.
terry
Re: pictureboxes and ovals, want ovals to be in front of pictureboxes
Welcome to the forums
You cannot send the images to the back of the ovals. It should be the other way around. The picture should be in the picturebox, and the Ovals should be drawn onto the picture
Re: pictureboxes and ovals, want ovals to be in front of pictureboxes
Originally Posted by HanneSThEGreaT
Welcome to the forums
You cannot send the images to the back of the ovals. It should be the other way around. The picture should be in the picturebox, and the Ovals should be drawn onto the picture
That is the issue. Visual Basic.net 2010 will not allow the ovals to be in front of the image. when I drow them on the screen, they automatically go behind the picture box. I can right click the picturebox and say send to back but nothing happens. There is no right click on the ovals. I want to make the ovals appear when clicked (change the border size and color on the click event) to "circle" the difference in the pictures for a picture hunt game. can you think of any other way of getting this done?
thanks a bunch.
T
Re: pictureboxes and ovals, want ovals to be in front of pictureboxes
Originally Posted by tmullin
That is the issue. Visual Basic.net 2010 will not allow the ovals to be in front of the image. when I drow them on the screen, they automatically go behind the picture box. I can right click the picturebox and say send to back but nothing happens. There is no right click on the ovals. I want to make the ovals appear when clicked (change the border size and color on the click event) to "circle" the difference in the pictures for a picture hunt game. can you think of any other way of getting this done?
thanks a bunch.
T
Then something is being done wrong.
Have a look at the attachment, see if that helps you
I basically did this :
Code:
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
Dim x As Integer = e.X
Dim y As Integer = e.Y
Dim gg As Graphics = Me.PictureBox1.CreateGraphics
gg.DrawEllipse(Pens.AliceBlue, x, y, 20, 20)
End Sub
Re: pictureboxes and ovals, want ovals to be in front of pictureboxes
Ahh OK .. see now ....
Yes Hannes has hit it spot on...
Your drawing the Ovals on the form itself.. They are not controls on the form but rather part of the Form itself... You need to draw them on the Picturebox itself.. Like Hannes demonstrates...
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.