I can capture the entire screen, without an issue - but I'd like to be
able to specify specific application windows, and/or spefic screen
dimensions just as the full WM Encoder Application does.
I see one example for specifying screen dimensions with C++ using the
Property Bag interface, but no documentation exists for VB.
Please Advise.
Thanks.
Jim
> Using the WMEncoder SDK. Is it possible to capture the
> screen for a specific area of the screen using
> VB6/VBScript?
>
> I can capture the entire screen, without an issue - but
> I'd like to be able to specify specific application
> windows, and/or spefic screen dimensions just as the full
> WM Encoder Application does.
What about cropping the captured image to the area you want
using IWMEncVideoSource?
--
// Alessandro Angeli
// MVP :: DigitalMedia
// a dot angeli at psynet dot net
>"jjones3535" wrote:
>
>> Using the WMEncoder SDK. Is it possible to capture the
>> screen for a specific area of the screen using
>> VB6/VBScript?
>>
>> I can capture the entire screen, without an issue - but
>> I'd like to be able to specify specific application
>> windows, and/or spefic screen dimensions just as the full
>> WM Encoder Application does.
>
>What about cropping the captured image to the area you want
>using IWMEncVideoSource?
Once you've done SrcVid.SetInput "ScreenCap://ScreenCapture1", does it
work to set the values below?
SrcVid.Screen=false
SrcVid.Left=200
SrcVid.Right=400
SrcVid.Top=150
SrcVid.Bottom=250
SrcVid.FlashRect=true
The SDK suggests they are set in C++ using the "Property bag"
interface, but I seem to remember it working by setting the properties
of the SrcVid object directly :
These come from the C++ constants used, suggesting a corresponding
property name would be available in VB or Javascript :
#define WMSCRNCAP_CAPTUREWINDOW CComBSTR("CaptureWindow")
#define WMSCRNCAP_WINDOWLEFT CComBSTR("Left")
#define WMSCRNCAP_WINDOWTOP CComBSTR("Top")
#define WMSCRNCAP_WINDOWRIGHT CComBSTR("Right")
#define WMSCRNCAP_WINDOWBOTTOM CComBSTR("Bottom")
#define WMSCRNCAP_FLASHRECT CComBSTR("FlashRect")
#define WMSCRNCAP_ENTIRESCREEN CComBSTR("Screen")
#define WMSCRNCAP_WINDOWTITLE CComBSTR("WindowTitle")
Any use or did it not work ?
Cheers - Neil
--
// Alessandro Angeli
// MVP :: DigitalMedia
// a dot angeli at psynet dot net[/quote:ad2e5945c0]
Alessandro - thanks for the reply. Your method works. Using
IWMEncVideoSource instead of IWMEncSource allows access to the
following properties:
CroppingBottomMargin
CroppingTopMargin
CroppingLeftMargin
CroppingRightMargin
which allow you to specify a certain region of the screen. These
properties take a long value representing the number of "rows" of
pixels to crop. I'm still trying to figure out a rows to pixels
conversion to really be able to pinpoint my capture - but this
certainly gets me closer.
Thanks.
Jim-
SrcVid.Screen=false
SrcVid.Left=200
SrcVid.Right=400
SrcVid.Top=150
SrcVid.Bottom=250
SrcVid.FlashRect=true
The SDK suggests they are set in C++ using the "Property bag"
interface, but I seem to remember it working by setting the
properties
of the SrcVid object directly :
These come from the C++ constants used, suggesting a corresponding
property name would be available in VB or Javascript :
#define WMSCRNCAP_CAPTUREWINDOW CComBSTR("CaptureWindow")
#define WMSCRNCAP_WINDOWLEFT CComBSTR("Left")
#define WMSCRNCAP_WINDOWTOP CComBSTR("Top")
#define WMSCRNCAP_WINDOWRIGHT CComBSTR("Right")
#define WMSCRNCAP_WINDOWBOTTOM CComBSTR("Bottom")
#define WMSCRNCAP_FLASHRECT CComBSTR("FlashRect")
#define WMSCRNCAP_ENTIRESCREEN CComBSTR("Screen")
#define WMSCRNCAP_WINDOWTITLE CComBSTR("WindowTitle")
Any use or did it not work ?
Cheers - Neil[/quote:61a70f5069]
Neil - Thanks for the reply. It seems like a reasonable solution,
unfortunately setting each of the properties you mention throws a
"Run-time error '438' - Object doesn't support this property or
method"
Is there any other way to access/set the properties you mention LEFT,
TOP, RIGHT, BOTTOM, etc?
Thanks.
Jim-