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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:21:42+00:00 2026-05-25T22:21:42+00:00

C# question Here is what I am trying to do. When I click a

  • 0

C# question

Here is what I am trying to do. When I click a button, I want the checkboxlist to smoothly change from say (200,10) to (200,100) in size. I am successful at getting to size to change instantaneously, but I want it to look smooth.

Here is the code I wrote:

    private void Form1_Load(object sender, EventArgs e)
    {
        timer1.Interval = 1;
    }

    private void button1_Click(object sender, EventArgs e)
    {
        timer1.Enabled = true;
    }

    private void timer1_Tick(object sender, EventArgs e)
    {
        if (checkedListBox1.Height < 100)
        {
            checkedListBox1.Size = new Size(checkedListBox1.Size.Width, checkedListBox1.Size.Height + 1);
        }
        else
        {
            timer1.Enabled = false;
        }
    }

I have used this coding to move objects smoothly, but never to change sizes.

So when you run this code, the box just flickers and it seems like its trying to change size, but it doesn’t, and the loop never ends.

Thanks!

  • 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-25T22:21:43+00:00Added an answer on May 25, 2026 at 10:21 pm

    You need to set IntegralHeight to false to that the box can be a height that is not a multiple of the item height.

    For the flickering, you should probably double-buffer the form which contains this control.

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

Sidebar

Related Questions

Related question [stackoverflow] here . I'm trying to do the above, but I want
After my last, failed, attempt at asking a question here I'm trying a more
Small design question here. I'm trying to develop a calculation app in C#. I
maybe it's not so proper to ask this question here... anyway, I'm trying to
I was trying to answer the question mentioned here by passing the reference to
Noob dumb question, no doubt -- but here it is: Trying to tutorialize myself
Question: I'm trying out to convert this here: http://support.microsoft.com/kb/828736 to VB.net I got it
Here's a quick question I've been banging my head against today. I'm trying to
I'm trying to learn WPF, so here's a simple question, I hope: I have
complete noob to Haskell here with probably an even noobier question. I'm trying to

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.