.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 17th, 2009, 10:07 AM
esupport4's Avatar
esupport4 esupport4 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 56 esupport4 User rank is Lance Corporal (50 - 100 Reputation Level)esupport4 User rank is Lance Corporal (50 - 100 Reputation Level)esupport4 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 11 h 8 m 59 sec
Reputation Power: 3
Convert Windows form(GUI) into image (i.e. jpg/tiff) format...!!!

Hello All,

My last thread was "Convert windows form into pdf". I have received a couple of solutions and I am thankful for that. But those are not as I want actually.

Now, my new thread is regarding "How can I convert Windows form (GUI) into tiff/JPEG/bmp or any kind of image???"

I code for panel printing but the result was not proper and panel printing is having limitation. It is not able to print whole GUI which is having scroll bar.

I think there might be a perfect solution for this, but I cannot get the right path.

Is there anyone who can help me?

Thanks in advance.

Dik****a.

Reply With Quote
  #2  
Old June 17th, 2009, 01:44 PM
Ronster Ronster is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2007
Location: Charlotte
Posts: 237 Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Days 10 h 53 m 8 sec
Reputation Power: 126
Is there a reason that you need the actual application to create the image from the windows form?

I ask, as you can easily do a capture of the windows application with free programs... one I use is called "ShotSender", here is a jpg image of my browser while it was showing your post... it would easily work the same way for a windows form.
Attached Images
File Type: jpg WindowCapture.JPG (348.4 KB, 28 views)

Reply With Quote
  #3  
Old June 18th, 2009, 02:35 AM
esupport4's Avatar
esupport4 esupport4 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 56 esupport4 User rank is Lance Corporal (50 - 100 Reputation Level)esupport4 User rank is Lance Corporal (50 - 100 Reputation Level)esupport4 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 11 h 8 m 59 sec
Reputation Power: 3
Quote:
Originally Posted by Ronster
Is there a reason that you need the actual application to create the image from the windows form?

I ask, as you can easily do a capture of the windows application with free programs... one I use is called "ShotSender", here is a jpg image of my browser while it was showing your post... it would easily work the same way for a windows form.


Hello,

Thanks for quick reply.

Actually, my client needs the whole windows GUI form as JPEG/tiff and then want to convert it into PDF. I can create PDF directly but the GUI is including some user controls which may not be possible to insert into created PDF as it is designed. So, I have decided to first create image file and then convert it into PDF.

I want this conversion silently. As soon as user saved data, JPEG/tiff file has been automatically created and will be saved as file into my database.

I am using C#.Net 2005 and the solution that I am searching for is a desktop application.


Dik****a.

Reply With Quote
  #4  
Old June 18th, 2009, 03:22 AM
jwdonahue's Avatar
jwdonahue jwdonahue is online now
Bellevue WA, USA
Click here for more information.
 
Join Date: May 2004
Location: Bellevue Washington, USA
Posts: 2,388 jwdonahue User rank is Colonel (50000 - 60000 Reputation Level)jwdonahue User rank is Colonel (50000 - 60000 Reputation Level)jwdonahue User rank is Colonel (50000 - 60000 Reputation Level)jwdonahue User rank is Colonel (50000 - 60000 Reputation Level)jwdonahue User rank is Colonel (50000 - 60000 Reputation Level)jwdonahue User rank is Colonel (50000 - 60000 Reputation Level)jwdonahue User rank is Colonel (50000 - 60000 Reputation Level)jwdonahue User rank is Colonel (50000 - 60000 Reputation Level)jwdonahue User rank is Colonel (50000 - 60000 Reputation Level)jwdonahue User rank is Colonel (50000 - 60000 Reputation Level)jwdonahue User rank is Colonel (50000 - 60000 Reputation Level)jwdonahue User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 2 Weeks 4 Days 5 h 53 m 45 sec
Reputation Power: 563
Ctrl-PrnScn to capture the entire desktop in the clipboard and then paste into your favorite image editor, convert to any format you like. I use Acrobat PDFWriter to "print" such things to a PDF file.
__________________
My worst nightmare was a pointless infinite loop.
Work in progress; don't poke the curmudgeon!
http://www.odonahue.com/

Reply With Quote
  #5  
Old June 18th, 2009, 04:57 AM
esupport4's Avatar
esupport4 esupport4 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 56 esupport4 User rank is Lance Corporal (50 - 100 Reputation Level)esupport4 User rank is Lance Corporal (50 - 100 Reputation Level)esupport4 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 11 h 8 m 59 sec
Reputation Power: 3
Quote:
Originally Posted by jwdonahue
Ctrl-PrnScn to capture the entire desktop in the clipboard and then paste into your favorite image editor, convert to any format you like. I use Acrobat PDFWriter to "print" such things to a PDF file.


Hello,

Thanks for reply.

As I described, I want whole thing AUTOMATIC. User just have to click on "Save" button and all procedure get done.

And through Print Screen, I can't fetch whole GUI. I can fat ch only the portion that I can see. If there is a scroll bar in GUI, whole portion is not going to capture.

If you have any programmatic solution, please inform me.


Dik****a.

Reply With Quote
  #6  
Old June 18th, 2009, 10:35 AM
MadDogBrown MadDogBrown is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2009
Posts: 735 MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 4 h 44 m
Reputation Power: 516
This should be a good starting point:

http://www.eggheadcafe.com/software/aspnet/32975540/screen-capture-screen-co.aspx

Reply With Quote
  #7  
Old June 19th, 2009, 01:59 AM
esupport4's Avatar
esupport4 esupport4 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 56 esupport4 User rank is Lance Corporal (50 - 100 Reputation Level)esupport4 User rank is Lance Corporal (50 - 100 Reputation Level)esupport4 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 11 h 8 m 59 sec
Reputation Power: 3
Quote:
Originally Posted by MadDogBrown
This should be a good starting point:

http://www.eggheadcafe.com/software/aspnet/32975540/screen-capture-screen-co.aspx


Hello,

Thanks for replying.

This will help only if I want to capture whole screen as image. This is a programmatic way to take Print Screen, that we generally do by using "Print Screen" button of Keyboard.

I want my application's (Windows Application) form only, which contains collections of different .Net/User controls. Please read my very first post for the same thread.

If you have other solution, inform me. I will be thankful to you.

Dik****a.

Reply With Quote
  #8  
Old June 20th, 2009, 08:05 AM
Direhit Direhit is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2005
Posts: 289 Direhit User rank is Sergeant (500 - 2000 Reputation Level)Direhit User rank is Sergeant (500 - 2000 Reputation Level)Direhit User rank is Sergeant (500 - 2000 Reputation Level)Direhit User rank is Sergeant (500 - 2000 Reputation Level)Direhit User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 18 h 18 m 3 sec
Reputation Power: 15
So just take a screenshot of only the dimensions and location of your Winform. This article should get you on the right path:

http://www.blackwasp.co.uk/ScreenCapture.aspx

Reply With Quote
  #9  
Old June 20th, 2009, 01:07 PM
MadDogBrown MadDogBrown is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2009
Posts: 735 MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 4 h 44 m
Reputation Power: 516
Quote:
Originally Posted by esupport4
Hello,

Thanks for replying.

This will help only if I want to capture whole screen as image. This is a programmatic way to take Print Screen, that we generally do by using "Print Screen" button of Keyboard.

I want my application's (Windows Application) form only, which contains collections of different .Net/User controls. Please read my very first post for the same thread.

If you have other solution, inform me. I will be thankful to you.

Dik****a.

http://dotnetpulse.blogspot.com/2006/12/how-to-capture-form-and-save-it-to.html

Reply With Quote
  #10  
Old June 22nd, 2009, 12:36 AM
esupport4's Avatar
esupport4 esupport4 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 56 esupport4 User rank is Lance Corporal (50 - 100 Reputation Level)esupport4 User rank is Lance Corporal (50 - 100 Reputation Level)esupport4 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 11 h 8 m 59 sec
Reputation Power: 3
Quote:
Originally Posted by MadDogBrown
http://dotnetpulse.blogspot.com/2006/12/how-to-capture-form-and-save-it-to.html


Hello,

Thanks for the reply again.

Let me check it. And I'll inform you weather it works or have to find another way...

Dik****a.

Reply With Quote
  #11  
Old June 22nd, 2009, 01:17 AM
esupport4's Avatar
esupport4 esupport4 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 56 esupport4 User rank is Lance Corporal (50 - 100 Reputation Level)esupport4 User rank is Lance Corporal (50 - 100 Reputation Level)esupport4 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 11 h 8 m 59 sec
Reputation Power: 3
Quote:
Originally Posted by MadDogBrown
http://dotnetpulse.blogspot.com/2006/12/how-to-capture-form-and-save-it-to.html


Hello,

I have followed the code. I made little modifications as per my requirement.

I set panel size instead of form size. This panel is having Scroll-bars. Instead of showing whole panel as Bitmap, it is showing only some of middle portion of given panel.

I did the same thing by another way (Panel Printing) and this is the same result. Only some of portion is drawn in Bitmap file.

The result is not proper. So have to find another solution.

Thanks again for the solution.

Dik****a.

Reply With Quote
  #12  
Old June 23rd, 2009, 09:26 AM
MadDogBrown MadDogBrown is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2009
Posts: 735 MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level)MadDogBrown User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 4 h 44 m
Reputation Power: 516
Quote:
Originally Posted by esupport4
Hello,

I have followed the code. I made little modifications as per my requirement.

I set panel size instead of form size. This panel is having Scroll-bars. Instead of showing whole panel as Bitmap, it is showing only some of middle portion of given panel.

I did the same thing by another way (Panel Printing) and this is the same result. Only some of portion is drawn in Bitmap file.

The result is not proper. So have to find another solution.

Thanks again for the solution.

Dik****a.


Search for BitBlt API; if BitBlt can't do it, nothing can.

Based on your description, it sounds like you're not using correct values for the targetBounds rectangle.

Last edited by MadDogBrown : June 23rd, 2009 at 09:32 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > Convert Windows form(GUI) into image (i.e. jpg/tiff) format...!!!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
Stay green...Green IT