Platforms to show: All Mac Windows Linux Cross-Platform
Back to ContinuityCameraMBS class.
ContinuityCameraMBS .Allow(Handle as Integer) as boolean
Whether to allow the control to receive data.
Example
Function Allow(Handle as Integer ) Handles Allow as boolean System.DebugLog CurrentMethodName+": " +Str(Handle) For Each control As RectControl In allowedControls // we hit our control If control.handle = handle Then Return True End If // are we within the coordinates with the mouse? Dim cx As Integer = control.MouseX Dim cy As Integer = control.MouseY 'System.DebugLog Str(cx)+"/"+Str(cy) Dim controlLeft As Integer = control.Left Dim controlTop As Integer = control.top Dim controlRight As Integer = controlLeft + control.Width Dim controlBottom As Integer = controlTop + control.Height Dim win As Window = control.Window // container? If win <> control.TrueWindow Then controlLeft = controlLeft + win.Left controlTop = controlTop + win.Top controlRight = controlRight + win.Left controlBottom = controlBottom + win.Top End If If cX >= controlLeft And cY >= controlTop And cX < controlRight And cy < controlBottom Then return true End If Next End Function
Return true to allow or false to disallow.
You may get the call for the control below mouse and for other control below it like containers.
So you may best decide based on the
ContinuityCameraMBS .Received(Data as MemoryBlock, type as String)
Data was received.
Example
Sub Received(Data as MemoryBlock, type as String ) Select Case type Case "JPEG" WriteFile("import.jpg" , data) Dim p As Picture = Picture.FromData(data) MainWindow.setPicture p Else MsgBox "new type: " +type End Select End Sub
Alternatively to using the delegate, you can subclass ContinuityCameraMBS and add this event to have a central place to receive data.
The items on this page are in the following plugins: MBS MacExtras Plugin .