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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:02:54+00:00 2026-05-14T05:02:54+00:00

i want to use the listview flicker"less" control found here Link directly in my

  • 0

i want to use the listview flicker"less" control found here Link

directly in my c# Project.
i dont want to make a custom user control project, build it to dll and then import it in my project. i just want this all in my c# Programm i am making.

i think i have to add in my project a class, and add the code, but how can i use the control now directly in my project?

  • 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-14T05:02:54+00:00Added an answer on May 14, 2026 at 5:02 am

    In Visual Studio, right-click on your project and then click ADD | USER CONTROL. Name the new control ListViewNF and click ADD.

    View the code for the new class. Change this line:

    public partial class ListViewNF : UserControl
    

    to this:

    public partial class ListViewNF : ListView
    

    and Rebuild. You’ll get a compiler error about AutoScaleMode – just delete the line in InitializeComponent that’s causing the error:

    // delete this line:
    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    

    So far, your code will look like this:

    public partial class ListViewNF : ListView 
    { 
        public ListViewNF() 
        {
            InitializeComponent();
        }
    }
    

    Change it to this:

    public partial class ListViewNF : ListView
    {
        public ListViewNF()
        {
            InitializeComponent();
    
            //Activate double buffering
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer | 
                ControlStyles.AllPaintingInWmPaint, true);
    
            //Enable the OnNotifyMessage event so we get a chance to filter out 
            // Windows messages before they get to the form's WndProc
            this.SetStyle(ControlStyles.EnableNotifyMessage, true);
        }
    
        protected override void OnNotifyMessage(Message m)
        {
            //Filter out the WM_ERASEBKGND message
            if (m.Msg != 0x14)
            {
                base.OnNotifyMessage(m);
            }
        }
    
    }
    

    Rebuild your project, and you should now see the ListViewNF in your Toolbox of controls on the left (right at the top). You can drag this control onto a form in the designer, just like a regular ListView.

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

Sidebar

Related Questions

I want to use the GridView mode of a ListView to display a set
I want some of the goodies in a ListView, like being able to use
i want to know how to use ListView.FixedViewInfo, so i need some code spinet
i want to create horizontal list with these uielements in wpf.I already use listview
I have a ListView that I want to use with an ArrayAdapter to add
I'm setting a long click listener on a listview and I want to use
I use a ListView with android.R.layout.simple_list_item_multiple_choice as list items. I want to sort the
In Listview, if I want to use the paging feature, how can i increase
i have a button in listview .now i want to use button.setonclicklistener and onListItemClick
So I'm using a ListView and I really want to use declaritive markup 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.