Dim opjInput As IWInput
Set objInput = new WInputClass()
Dim opjResult As IWResult
Set objResult = new WResultClass()
Dim Hwnd As integer
Hwnd = 0
Dim x1 As integer
X1 = 0
Dim x2 As integer
X2 = 0
Dim y1 As integer
y1 = 0
Dim y2 As integer
Y2 = 0
Dim ContextWordsLeft As integer
ContextWordsLeft = 0
Dim ContextWordsRight As integer
ContextWordsRight = 0
‘Set this values
...
opjInput.Hwnd = hwnd;
opjInput.StartX = x1;
opjInput.StartY = y1;
opjInput.EndX = x2;
opjInput.EndY = y2;
opjInput.ContextWordsLeft = ContextWordsLeft;
opjInput.ContextWordsRight = ContextWordsRight;
On Error GoTo Catch
opjResult = capture.Capture(opjInput);
Catch:
MsgBox(...);
Exit Sub;
|