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 85207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:03:10+00:00 2026-05-10T22:03:10+00:00

I have CustomForm inherited from Form which implements a boolean property named Prop .

  • 0

I have CustomForm inherited from Form which implements a boolean property named Prop. The forms I’ll be using will inherit from CustomForm. This property will do some painting and changes (if it’s enabled) to the form. However, this is not working as it should, the VS IDE designed is not being refresh to show the changes. But if I press Ctrl+Shift+B (Menu: Build » Build Solution) the VS IDE will refresh, the form designer will even disappear for a split second and will redraw itself with the new changes applied.

So, is there a way, by code, to force the VS IDE designer to refresh itself just like it happens when I build the solution? If so, I could add that code to the Prop set accessor and my problem was gone.

Note that I’ve tried to call Invalidate(), Refresh() and Update. But none of them seemed to fix the problem…


Here’s a little insight on my real problem. My code goes something like this:

internal class MyForm : Form {     private FormBorderStyle formBorderStyle;     private bool enableSkin;      [DefaultValue(false)]     public bool EnableSkin {         get {                 return enableSkin;         } set {                 enableSkin = value;                  if(enableSkin) {                         BackColor = Color.Lime;                         MaximizedBounds = Screen.GetWorkingArea(this);                         TransparencyKey = Color.Lime;                          base.FormBorderStyle = FormBorderStyle.None;                 } else {                         BackColor = SystemColors.Control;                         MaximizedBounds = Rectangle.Empty;                         TransparencyKey = Color.Empty;                          base.FormBorderStyle = FormBorderStyle;                 }         }     }      [DefaultValue(FormBorderStyle.Sizable)]     public new FormBorderStyle FormBorderStyle {         get {                 return formBorderStyle;         } set {                 formBorderStyle = value;                  if(EnableSkin) {                         base.FormBorderStyle = FormBorderStyle.None;                 } else {                         base.FormBorderStyle = formBorderStyle;                 }          }     }      internal MyForm() {         EnableSkin = false;         FormBorderStyle = FormBorderStyle.Sizable;     } } 

And the problem I’m having is something like this: http://blogs.msdn.com/calvin_hsia/archive/2007/05/01/windows-vista-aero-borderstyle-paint-problem-as-non-administrator.aspx

In my case, that happens when you set the EnableSkin to True, change it back to False and then, changing the FormBorderStyle will cause the issue you can see on the link above. As stated in the article, the problem doesn’t happen when running VS as administrator.

That’s why I’m looking for a way to refresh the VS IDE designer. In other words, now that I’ve found that article, I need to recreate the window just like it happens when the solution is rebuilt.


How do I declare a property in the base form?

I currently have:

public class MyForm : Form { } 

And I can only declare properties inside that class, not inside the Form one… I also have used Invalidate() as I said in the first post, but it doesn’t fix my problem.

  • 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. 2026-05-10T22:03:11+00:00Added an answer on May 10, 2026 at 10:03 pm

    Someone else helped me out and to fix the problem. I just call ReCreateHandle() when the user sets EnableSkin to false. Problem solved 🙂

    Thanks everyone though 🙂

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

Sidebar

Ask A Question

Stats

  • Questions 123k
  • Answers 123k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Unfortunately, there isn't a lot of support for a program… May 12, 2026 at 1:03 am
  • Editorial Team
    Editorial Team added an answer This does what you want and gets rid of the… May 12, 2026 at 1:03 am
  • Editorial Team
    Editorial Team added an answer This should do that: $(document).ready(function() { $("#clickMe").click(function() { var src… May 12, 2026 at 1:03 am

Related Questions

intro: I am pretty sure this is my fault. But I just don't see
I have a need to display a custom form instead of the default inspector
I have a Lotus Notes application which actually consists of a template with all
I have been using code similar to this MessageDlg('', mtWarning, [mbOK], 0); throughout my

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.