COM Interface  Previous topicNext topicFirst topicLast topic

COM Interface for Programmers
Print Screen Deluxe comes with a built in COM interface for programmers.  If you want to write software that includes the ability to capture, print and save screens, you will want to have Print Screen Deluxe. Here are a list of the functions and some sample code.
 
First of all, add to your project... a reference to "Print Screen Deluxe 1.0 <Type Library>".
 
Here are all of the methods in the object. They are fairly self explanatory.
 
BYTE CaptureFullScreen(void);
BYTE CaptureActiveWindow(void);
BYTE CaptureWindow(void);
BYTE CaptureClientArea(void);
BYTE CaptureClipboardImage(void);
BYTE CaptureRegion(void);
BYTE CaptureMenu(void);
 
All of the Capture methods capture the part of the screen they describe.  The screen image is held in memory until the COM object is released or until you capture the screen again.
 
void Print(void);
 
Prints the screen last captured to the default printer.
 
void SaveFile(BSTR FilePath);
 
Saves the screen last captured to the file you provide in the FilePath parameter.
 
VB Sample:
 
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim psd = CreateObject("PrintScreenDeluxe.Interface")
psd.CaptureFullScreen()
psd.Print()
End Sub
 
C++ Sample:
 
void Foo()
{
    CInterface psd;
 
    psd.CreateDispatch("PrintScreenDeluxe.Interface");
    psd.CaptureFullScreen();
    psd.SaveFile("c:\\tmp\\FullScreen.BMP");
    psd.ReleaseDispatch();
}
 
C# Sample:
 
private void button1_Click(object sender, System.EventArgs e)
        {
        PrintScreenDeluxeLib.Interface psd;
 
        psd = new PrintScreenDeluxeLib.InterfaceClass();
        psd.CaptureFullScreen();
        psd.Print();
           
        }