473,385 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Save a ListView as a JPEG (Visual studio 2005 C#)

Hi All

I am displaying a listview in a panel and I want to be able to save the listview as a jpeg, in order that I can incorporate it in a Word Document. While I can save the panel as a jpeg by "converting" it to a bitmap, this process only saves that which is visible in the panel. The properties of the listview allow for scrollbars, so that when the listview is displayed one can scroll through it.

Herein I suspect lies the problem in that it is the listview and not the panel that I should be converting to bitmap.

A further complication is that I am returning the listview from an instance of the class that creates it.

Thanking you

James C
Mar 17 '07 #1
1 1577
i'm sure there is a more elegant solution that this...but since you already know how to convert a panel to a bitmap (i don't know how to do that!)...

could you try this...

1) add the listView to panelA.
2) make panelA the same width and height as listView
3) add panelA to panelB
4) make panelB the size you need to fit properly on the form
5) convert panelA to the jpg...it will be the proper size

not sure if it will work...but that's what i'd try if i already knew how to convert a panel to a bitmap and didn't know how to convert a listView to one.

(although, surely there is a way to paint the listView directly to the bitmap...it is afterall painting itself anyway)
Mar 18 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Randy Birch | last post by:
Reposted as the original is reported as deleted from the server. re: MSComCtl Listview control cashes after installing VB6/VS6 SP6 I have been advised that this problem has been reproduced...
1
by: Alberto | last post by:
Does anybody know if in the next version of visual studio will be a ListView who allows CheckBoxes in all the columns? Thank you
1
by: The Confessor | last post by:
I currently have a listbox in my program which I populate with data from a random access file as follows: For T = 1 To HighestPointID FileGet(1, Point(T), T) ListBox_Point.Items.Add(T & " Lat:...
1
by: Brian Henry | last post by:
Anyone have any good examples of owner listview drawing in .NET 2.0? Websites, code examples, etc? thanks! just interested in seeing what people are doing with this
1
by: dev.amit | last post by:
Hello Friends I am having a listview of three column. I want to short it on the individual column. Any help would be great. Love Amit
11
by: rb | last post by:
Hi All, Is there a property or method to keep the headercolumns from being resized by the user for a listview? I am using Visual Basic in Visual Studio . net 2005 Thank you.
7
by: Laurent Navarro | last post by:
Hello, I'm creating a control including a listview. I would like to be able to set the columns through the Design Tool in Visual Studio, so I created a parameter to access the columns of my...
1
by: polocar | last post by:
Hi, I'm using Visual C# 2005 (part of Visual Studio 2005 Professional Edition), and I have the following problem: I populate a ListView object with several items, and at the end of this process I...
0
by: crealas | last post by:
I'm currently building a GUI in C# using Microsoft Visual Studio 2005. I have put together an Explorer style control as explained in the walkthrough in the Visual Studio 2005 help. I got it...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.