|
-
February 28th, 2000, 08:35 AM
#1
screen capture in java
I have to capture the desktop screen.I have tried with jdk1.3
beta java.awt.robot but it has given an error.i am now trying
with VC getDesktopWindow method of win32 api.Still i am not
getting that. I would be greatly thankful to you if you provide
me with a workable solution.thanks in advance.
Narayan
narayan rallabandi murthy
-
October 14th, 2000, 01:49 AM
#2
Re: screen capture in java
There is no direct WIN32 api for screen capture, you need to createCompatibleDC with the DC of the window to capture and BitBlt the data into the new DC and save to file with CreateBitmap and BITMAP HEADER info included. Look at the code in the VC++ discussion.
-
October 16th, 2000, 01:19 PM
#3
Re: screen capture in java
Try this:
public void actionPerformed(ActionEvent e) {
PrinterJob printJob = PrinterJob.getPrinterJob();
printJob.setPrintable(this);
if (printJob.printDialog()) {
try {
printJob.print();
} catch (Exception prt) {
System.err.println(prt.getMessage());
}
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|