Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7522821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:37:29+00:00 2026-05-30T02:37:29+00:00

I apologize if the terminology is incorrect – not sure whether to call it

  • 0

I apologize if the terminology is incorrect – not sure whether to call it an inherited control, custom control, or user control. Anyway please keep in mind this is a compact framework 3.5/smart device development question. I have a control that I have made that inherits from a button. Basically it draws a gradient and rounds the corners. I have 6 custom properties that I have added to this control. I noticed that when I set the value of one of these properties in the property window in the designer, I can never “reset” the value (ie right mouse click -> reset). The issue is that one of those properties is an image and now the only way to clear that image is to delete the button from the form and recreate it. I tried setting a default value in DesignTimeAttributes.xmta file for all the properties but that didn’t seem to help. “Reset” is still disabled. Any help is appreciated. Code from the Image property of the class follows:

Private _Image As Bitmap = Nothing
Public Property Image() As Bitmap
    Get
        Return _Image
    End Get
    Set(ByVal value As Bitmap)
        _Image = value
        Invalidate()
    End Set
End Property
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T02:37:31+00:00Added an answer on May 30, 2026 at 2:37 am

    Try this:

    public void ResetImage()
    {
        if (Image != null)
        {
          Image.Dispose();
          Image = null;
        }
    }
    

    You can always create Reset method for any Property:

    public void Reset[PropertyName]()
    {
      // Reset your property
    }
    

    Note: The designer won’t call the Reset method if you set the DefaultValue in Xmta.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I apologize in advance if the terminology in my question is incorrect. I want
I apologize if I use the incorrect terminology here, I've only been using emacs
I have a simple web form that feeds into Infusionsoft. Not my call. I
Please keep in mind that I am new to world of .Net and F#.
I'm new to programming and apologize up front if I misuse terminology. In a
I apologize if link is not the exact term for this in advance. I
My apologies if I am using the incorrect terminology, as I'm a bit of
I apologize in advance for some confusion over the terminology. I get a bit
Apologies if my terminology is incorrect, I have only started Java (and OO programming
I'm new to git so I apologize (and please correct me) if I misuse

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.