[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

11/05/2009 at 01:34PM PST, ID: 24876186 | Points: 250
[x]
Attachment Details

How to delete picture box image property in a custom control at design time

Asked by Wingfootit in VB Controls, Windows Mobile (Pocket PC / Win CE) Operating Systems, Visual Studio

Tags: custom control, visual basic, windows mobile

I am creating a windows mobile 6.1 application in VS2008 and I am creating a custom control that will use the picture box control.  I expose the image property of the picture box by using a property tag.  After compiling the code and adding the control to my project's form, the picture box image is initially blank but if I set it I must do it via the open dialog box (same as if just using the regular picture box).  The problem is when I want to delete the image (if I made a mistake and do not want to include the image just have a blank picture box, it does recognize that the delete key was pressed in the property field.  The only access to change the value is via the open dialog box and that requires a file to be selected.  Attached is a code snippet of the property tag for to expose the image.  Any help is greatly appreciated.
1:
2:
3:
4:
5:
6:
7:
8:
    Public Property Position1Picture() As Image
        Get
            Return picPosition1.Image
        End Get
        Set(ByVal value As Image)
            picPosition1.Image = value
        End Set
    End Property
[+][-]11/07/09 10:00 AM, ID: 25767284

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/09/09 06:42 AM, ID: 25776287

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/09/09 11:13 AM, ID: 25778983

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/10/09 08:41 AM, ID: 25787111

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74 - Hierarchy / EE_QW_3_20080625