Overview‎ > ‎

Pseudo code


wMonitor.Start(wmKeyCtrl, wmMouseRight, true)


We should instantiate an IWInput object (which is an interface which comes also in the WMonitorX.dll). Let's say that this object is called objInput.

In order to perform the capture we should set some options of this object:

objInput.Hwnd = hwnd;
objInput.StartX = x;
objInput.StartY = y;
objInput.EndX = x;
objInput.EndY = y;

these values are passed to your app when a user action is triggered.

Now, for eventually grabbing the capture text, we should instantiate an IWResult object like this:

objResult = wCapture.Capture(objInput);

The objResult.Text will contain the captured word.

You should check out our sample projects to better understand this.