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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:16:02+00:00 2026-05-30T19:16:02+00:00

I have designed a radio button custom control. it works fine on my computer

  • 0

I have designed a radio button custom control. it works fine on my computer but when i port my application on th other machine that doesn’t appear.

any body does know why?

here is part of my control:

public class CustomCheckBox:UserControl
{
    public CustomCheckBox()
    {
     // Height+=50;
      count++;
      index = count;
      Height = 50;
      Width = 100;
      Region r = new Region(new Rectangle( 0, 0, Width, Height));
      this.Region = r;

      this.SetStyle(ControlStyles.ResizeRedraw, true);


    }
    protected override CreateParams CreateParams
    {
        get
        {
            CreateParams cp = base.CreateParams;
            cp.ExStyle |= 0x02000000;  // Turn on WS_EX_COMPOSITED
            // cp.Style &= ~0x02000000;
            return cp;
        }
    } 
    protected override void OnMouseLeave(EventArgs e)
    {
        paintState = 0;            
        base.OnMouseLeave(e);
        this.Invalidate();
    }
  ...
  • 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-30T19:16:04+00:00Added an answer on May 30, 2026 at 7:16 pm

    The problem solved as Hans Passant has commented above, i removed the WS_EX_COMPOSITED style flag which was used to apply drawing optimization to remove flicker on appearance and instead i used this kind of optimization in constructor and it worked fine.

          this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
          this.SetStyle(ControlStyles.CacheText, true);
          this.SetStyle(ControlStyles.ContainerControl, false);
          this.SetStyle(ControlStyles.ResizeRedraw, false);
          this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
          this.SetStyle(ControlStyles.FixedHeight, true);
          this.SetStyle(ControlStyles.FixedWidth, true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have designed a custom section handler before but I'm faced with a problem
i have designed an form in that form contain button when i click on
I have designed a custom Windows application in C#. Now, I would like to
I have designed a gridview with a radio button inside the itemtemplet. I also
I am planning to build a database for a school application. I have designed
I have designed a standalone application using swings which can read data from HID
I have designed several animated Panel s in C# that all inherit from one
I have designed the following class that should work kind of like a method
I have designed a system that is made up of 3 separate applications: Web
I have designed a GUI connect to DB button using Swing in java now

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.