Filtering Windows and Processes

Top  Previous  Next

 

Continuing with the previous example, let's add code to the radio buttons placed on the form. They will allow us to choose to publish the entire desktop or just the application process windows.

 

Add a handler to radiobutton CheckedChanged event:

 

Private Sub rbDesktop_CheckedChanged(

ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbDesktop.CheckedChanged, rbThisapp.CheckedChanged

 

CaptureModeChanged()

 

End Sub

 

Private Sub CaptureModeChanged()

 

If IsNothing(scraper) Then Exit Sub

 

If rbDesktop.Checked Then

scraper.CaptureMode = ThinVncX.AxCaptureMode.cmAllProcesses

Else

scraper.CaptureMode = ThinVncX.AxCaptureMode.cmThisProcess

End If

 

End Sub

 

Now compile and run the project and try selecting "This Application". On the Web Browser page you should see just the application window.