|
-
Nov 25th, 2009, 06:36 AM
#1
Thread Starter
Addicted Member
Lostfocus event for Picture box.
Private Picture_Boxes() As MyDevicePage_Picturebox
Private Sub MySkanPage_Picturebox_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.DoubleClick
MyBase.BorderStyle = Windows.Forms.BorderStyle.FixedSingle
End Sub
Private Sub MySkanPage_Picturebox_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LostFocus
MyBase.BorderStyle = Windows.Forms.BorderStyle.None
End Sub
Hi friends,
I am adding pictureboxes to my form as shown in the code above. but the problem is lostfocus event is not working. Can anybody tell me were the problem is.Thanks in advance.
Regards,
Susheelss
-
Nov 25th, 2009, 07:15 AM
#2
Re: Lostfocus event for Picture box.
First up, you should generally handle the Enter and Leave events of a control rather than the GotFocus and LostFocus events. Apart from that, a PictureBox can't receive focus in the first place so it's not going to raise any of those four events.
-
Nov 25th, 2009, 07:39 AM
#3
Thread Starter
Addicted Member
Re: Lostfocus event for Picture box.
Thanks Mr.jmcilhinney. If that is the case with picture box then how can i change the image of the picture box clicked and change the image of any other picture box containing same image to any other as in case of option buttons.
-
Nov 25th, 2009, 07:48 AM
#4
Re: Lostfocus event for Picture box.
The PictureBox has a Click event. It just doesn't receive focus when you click it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|