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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:03:52+00:00 2026-05-12T18:03:52+00:00

I have a listview control that is on a winforms form. It fills the

  • 0

I have a listview control that is on a winforms form. It fills the full screen but there are more items there than the screen can show.

How can I take a screenshot of the whole control as if I could display the whole contents of the listview on screen? So if the whole listview takes 1000 x 4000 pixels, then I want an image/bitmap of that size.

How do I do this? When I try printscreen, it only returns what’s on the screen and anything outside the screen appears grey.

  • 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-12T18:03:52+00:00Added an answer on May 12, 2026 at 6:03 pm

    Forms are controls, so you should be able to save the entire contents to a bitmap with something like:

    var bm = new Bitmap(yourForm.Width, yourForm.Height);
    yourForm.DrawToBitmap(bm, bm.Size);
    bm.Save(@"c:\whatever.gif", ImageFormat.Gif);

    Update

    DrawToBitmap only draws what’s on-screen. If you want to draw the entire contents of the list you must iterate through the list to find the size of the contents then draw each item. Something like:

    var f = yourControl.Font;
    var lineHeight = f.GetHeight();
    
    // Find size of canvas
    var s = new SizeF();
    using (var g = yourControl.CreateGraphics())
    {
        foreach (var item in yourListBox.Items)
        {
            s.Height += lineHeight ;
            var itemWidth = g.MeasureString(item.Text, f).Width;
            if (s.Width < itemWidth)
                s.Width = itemWidth;
        }
    
        if (s.Width < yourControl.Width)
             s.Width = yourControl.Width;
    }
    
    using( var canvas = new Bitmap(s) )
    using( var g = Graphics.FromImage(canvas) )
    {
        var pt = new PointF();
        foreach (var item in yourListBox.Items)
        {
            pt.Y += lineHeight ;
            g.DrawString(item.Text, f, Brushes.Black, pt);
        }
    
        canvas.Save(wherever);
    }
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ListView control that is in FullRowSelect mode, MultiSelect off and using
Can you have a multicolumn listview control where one of the columns is a
I have a Winforms App in C# with a ListView control. This ListView shows
I have a CheckedListBox (WinForms) control (which inherits from ListBox; googling shows that the
I have a WinForms application (I'm using VB) that can be minimized to the
I have this ListView that displays a custom user control. The custom user control
I have a ListView control, and I'm trying to figure out the easiest/best way
I have a few listview controls on a windows form and i've assigned a
I have a ListView which sometimes I need to put around 10000 items in.
I have a ListView in WPF that is databound to a basic table that

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.