|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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. |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
||||
|
||||
|
Quote:
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. |
|
#4
|
||||
|
||||
|
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/ |
|
#5
|
||||
|
||||
|
Quote:
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. |
|
#6
|
|||
|
|||
|
This should be a good starting point:
http://www.eggheadcafe.com/software/aspnet/32975540/screen-capture-screen-co.aspx |
|
#7
|
||||
|
||||
|
Quote:
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. |
|
#8
|
|||
|
|||
|
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 |
|
#9
|
|||
|
|||
|
Quote:
http://dotnetpulse.blogspot.com/2006/12/how-to-capture-form-and-save-it-to.html |
|
#10
|
||||
|
||||
|
Quote:
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. |
|
#11
|
||||
|
||||
|
Quote:
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. |
|
#12
|
|||
|
|||
|
Quote:
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > .Net Development > Convert Windows form(GUI) into image (i.e. jpg/tiff) format...!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|