Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example:
#PBForms CREATED V2.01
'--------------------------------------------------------------------------------
'
' VideoCapX Demo Program for PowerBasic 10
' Interface built using PBForms 2.0
' Compiles using PB10.3
' Use Jose Roca Includes, version 1.06
' REPLACE the contents of LicKey_VideoCapX with your VideoCapX license
'
' Demonstration program for using the VideoCapX ActiveX control with DDT to view live video from a DirectShow or UVC device.
' Special thanks to Jose Roca who helped me to get VideoCapX working many moons ago.
' Acknowledgements to the exceptional code samples of Jim Fritts, Gary Beene, Borje Hagsten and the many others who have shared their
' knowledge so that some of us non-programmers can still write functional code.
'
'--------------------------------------------------------------------------------
#Compile Exe "VideoCapX Demo.exe"
#Dim All
'--------------------------------------------------------------------------------
' ** Includes **
'--------------------------------------------------------------------------------
' Use Jose Roca Includes, version 1.06
#PBForms BEGIN INCLUDES
%USEMACROS = 1
#Include Once "WIN32API.INC"
#Include Once "COMMCTRL.INC"
#Include Once "PBForms.INC"
#PBForms END INCLUDES
'--------------------------------------------------------------------------------
'--------------------------------------------------------------------------------
' ** VideoCapX Identifiers **
'--------------------------------------------------------------------------------
' VideoCapX Class Identifiers
$CLSID_VIDEOCAPXLib_VideoCapX = Guid$("{912FB007-DD9A-11D3-BD8D-DAAFCB8D9378}")
$CLSID_VIDEOCAPXLib_Event__DVideoCapXEvents = Guid$("{9CCCD7DA-17AE-49F9-BEA3-DBCAB557BC05}")
' VideoCapX Interface Identifiers
$IID_VIDEOCAPXLib_Int__DVideoCapX = Guid$("{912FB005-DD9A-11D3-BD8D-DAAFCB8D9378}")
$IID_VIDEOCAPXLib_Int__DVideoCapXEvents = Guid$("{912FB006-DD9A-11D3-BD8D-DAAFCB8D9378}")
'--------------------------------------------------------------------------------
' ** Constants **
'--------------------------------------------------------------------------------
#PBForms BEGIN CONSTANTS
%IDD_DIALOG1 = 101
%IDC_BFRAME = 1112
%IDC_BMINLABEL = 1114
%IDC_BMAXLABEL = 1115
%IDC_BSETLABEL = 1118
%IDC_BMIN = 1119
%IDC_BMAX = 1120
%IDC_BCURRENTLABEL = 1123
%IDC_BCURRENT = 1124
%IDC_BCOMBOBOX = 1125
%IDC_CAMBUTTON = 1138
%IDC_BCHECKBOX = 1139
%IDC_CMINLABEL = 1141
%IDC_CMAXLABEL = 1142
%IDC_CSETLABEL = 1143
%IDC_CMIN = 1144
%IDC_CMAX = 1145
%IDC_CCURRENTLABEL = 1146
%IDC_CCURRENT = 1147
%IDC_CCOMBOBOX = 1148
%IDC_CCHECKBOX = 1149
%IDC_GMINLABEL = 1151
%IDC_GMAXLABEL = 1152
%IDC_GSETLABEL = 1153
%IDC_GMIN = 1154
%IDC_GMAX = 1155
%IDC_GCURRENTLABEL = 1156
%IDC_GCURRENT = 1157
%IDC_GCOMBOBOX = 1158
%IDC_GCHECKBOX = 1159
%IDC_CFRAME = 1150
%IDC_GFRAME = 1160
#PBForms END CONSTANTS
'--------------------------------------------------------------------------------
%INVOKE_FUNC = 1
Global vcxEvents As Int__DVideoCapXEvents
Global hOcx As Dword, oOcx As Dispatch, lastMousePtr As Long
' Dispatch Functions
Declare Function MakeDispatchVariant (ByVal lpObj As Dword, ByRef vObj As Variant) As Long
' ATL Functions
Declare Function AtlAxCreateControlLic Lib "ATL100.DLL" Alias "AtlAxCreateControlLic" (ByVal lpszName As Dword, ByVal hParent As Dword, _
ByVal pStream As Dword, ByRef ppUnkContainer As Dword, ByVal bstrLic As Dword) As Dword
Declare Function AtlAxWinInit Lib "ATL100.DLL" Alias "AtlAxWinInit" () As Long
Declare Function AtlAxWinTerm () As Long
Declare Function AtlAxGetControl Lib "ATL100.DLL" Alias "AtlAxGetControl"(ByVal hWnd As Dword,ByRef pp As Dword) As Dword
Declare Sub AtlMakeDispatch(ByVal lpObj As Dword,ByRef vObj As Variant) ' not used here
' VideoCapX Indirect Access Functions
Declare Function GetCameraControlRange(ByVal inValue As Long, ByVal vArrayPtr As Dword) As Long
'--------------------------------------------------------------------------------
' ** Declarations **
'--------------------------------------------------------------------------------
Declare CallBack Function ShowDIALOG1Proc()
Declare Function ShowDIALOG1(ByVal hParent As Dword) As Long
#PBForms DECLARATIONS
'--------------------------------------------------------------------------------
'%PROTECT=1
'--------------------------------------------------------------------------------
Function PBMain()
PBFormsInitComCtls (%ICC_WIN95_CLASSES Or %ICC_DATE_CLASSES Or %ICC_INTERNET_CLASSES)
ShowDIALOG1 %HWND_Desktop
End Function
'--------------------------------------------------------------------------------
'--------------------------------------------------------------------------------
' ** CallBacks **
'--------------------------------------------------------------------------------
CallBack Function ShowDIALOG1Proc()
Local vVar, vVar2 As Variant, result As Long
Local i As Long, value As Long
Local msgStr As AsciiZ*32
Dim camVal(6) As Long
Select Case Cb.Msg
Case %WM_InitDialog, %WM_User+1
' have never been able to get METHOD GetVideoProcAmpValueRange or METHOD GetCameraControlRange to work directly -- use the make dispatch workaround
' get brghtness settings
result=GetVideoProcAmpValueRange(0,ByVal VarPtr(camVal(0)))
vVar=0 As Long : vVar2 = 0 As Long :
Object Call oOcx.GetVideoProcAmp(vVar) To vVar2 : value=Variant#(vVar2)
' set brightness controls
Control Set Text Cb.Hndl, %IDC_BMIN, Str$(camVal(0))
Control Set Text Cb.Hndl, %IDC_BMAX, Str$(camVal(1))
Control Set Text Cb.Hndl, %IDC_BCURRENT, Str$(value)
' build the brightness settings combobox list
If Cb.Msg=%WM_InitDialog Then
For i=camVal(0) To camVal(1)
ComboBox Add Cb.Hndl, %IDC_BCOMBOBOX, Str$(i)
Next i
End If
ComboBox Select Cb.Hndl, %IDC_BCOMBOBOX, value-camVal(0)+1
' get contrast settings
result=GetVideoProcAmpValueRange(1,ByVal VarPtr(camVal(0)))
vVar=1 As Long : vVar2=0 As Long
Object Call oOcx.GetVideoProcAmp(vVar) To vVar2 : value=Variant#(vVar2)
' set contrast controls
Control Set Text Cb.Hndl, %IDC_CMIN, Str$(camVal(0))
Control Set Text Cb.Hndl, %IDC_CMAX, Str$(camVal(1))
Control Set Text Cb.Hndl, %IDC_CCURRENT, Str$(value)
' build the contrast settings combobox list
If Cb.Msg=%WM_InitDialog Then
For i=camVal(0) To camVal(1)
ComboBox Add Cb.Hndl, %IDC_CCOMBOBOX, Str$(i)
Next i
End If
ComboBox Select Cb.Hndl, %IDC_CCOMBOBOX, value-camVal(0)+1
' get gamma settings
result=GetVideoProcAmpValueRange(5,ByVal VarPtr(camVal(0)))
vVar=5 As Long : vVar2=0 As Long
Object Call oOcx.GetVideoProcAmp(vVar) To vVar2 : value=Variant#(vVar2)
' set gamma controls
Control Set Text Cb.Hndl, %IDC_GMIN, Str$(camVal(0))
Control Set Text Cb.Hndl, %IDC_GMAX, Str$(camVal(1))
Control Set Text Cb.Hndl, %IDC_GCURRENT, Str$(value)
' build the gamma settings combobox list
If Cb.Msg=%WM_InitDialog Then
For i=camVal(0) To camVal(1)
ComboBox Add Cb.Hndl, %IDC_GCOMBOBOX, Str$(i)
Next i
End If
ComboBox Select Cb.Hndl, %IDC_GCOMBOBOX, value-camVal(0)+1
Case %WM_Destroy
Case %WM_Command
Select Case Cb.Ctl
Case %IDC_CAMBUTTON
If Cb.CtlMsg = %BN_Clicked Then
Object Call oOcx.ShowVideoSourceDlg
SendMessage Cb.Hndl, %WM_User+1, 0, 0
End If
Case %IDC_BCOMBOBOX
If HiWrd(Cb.WParam)=%CBN_SelChange Then
' change the brightness
ComboBox Get Text Cb.Hndl, %IDC_BCOMBOBOX To msgStr
vVar=0 As Long : vVar2=Val(msgStr) As Long
Object Call oOcx.SetVideoProcAmp(vVar,vVar2)
Control Set Text Cb.Hndl, %IDC_BCURRENT, msgStr
End If
Case %IDC_CCOMBOBOX
If HiWrd(Cb.WParam)=%CBN_SelChange Then
' change the brightness
ComboBox Get Text Cb.Hndl, %IDC_CCOMBOBOX To msgStr
vVar=1 As Long : vVar2=Val(msgStr) As Long
Object Call oOcx.SetVideoProcAmp(vVar,vVar2)
Control Set Text Cb.Hndl, %IDC_CCURRENT, msgStr
End If
Case %IDC_GCOMBOBOX
If HiWrd(Cb.WParam)=%CBN_SelChange Then
ComboBox Get Text Cb.Hndl, %IDC_GCOMBOBOX To msgStr
vVar=5 As Long : vVar2= Val(msgStr) As Long
Object Call oOcx.SetVideoProcAmp(vVar,vVar2)
Control Set Text Cb.Hndl, %IDC_GCURRENT, msgStr
End If
End Select
Case Else
End Select
End Function
'--------------------------------------------------------------------------------
'--------------------------------------------------------------------------------
' ** Dialogs **
'--------------------------------------------------------------------------------
Function ShowDIALOG1(ByVal hParent As Dword) As Long
Local OcxName As AsciiZ * 128
Local pUnk As Dword, vVar As Variant, vVar2 As Variant, hInst As Dword, iMax As Long
Local ProgID_VideoCapX As String, LicKey_VideoCapX As String
Local hr As Dword, lrslt As Long
#PBForms BEGIN DIALOG %IDD_DIALOG1->->
Local hDlg As Dword
Dialog New Pixels, hParent, " VideoCapX Live Video", 147, 149, 887, 507, %WS_Popup _
Or %WS_Border Or %WS_DlgFrame Or %WS_SysMenu Or %WS_ClipSiblings Or _
%WS_Visible Or %DS_ModalFrame Or %DS_Center Or %DS_3DLook Or _
%DS_NoFailCreate Or %DS_SetFont, %WS_Ex_Windowedge Or _
%WS_Ex_ControlParent Or %WS_Ex_Topmost Or %WS_Ex_Left Or _
%WS_Ex_LtrReading Or %WS_Ex_RightScrollbar, To hDlg
Control Add Frame, hDlg, %IDC_BFRAME, "Brightness", 688, 3, 176, 144
Control Add Label, hDlg, %IDC_BMINLABEL, "Bright Min", 712, 35, 60, 20
Control Add Label, hDlg, %IDC_BMIN, "0", 784, 35, 60, 20, %WS_Child Or _
%WS_Visible Or %SS_Right, %WS_Ex_Left Or %WS_Ex_LtrReading
Control Add Label, hDlg, %IDC_BMAXLABEL, "Bright Max", 712, 58, 60, 20
Control Add Label, hDlg, %IDC_BMAX, "0", 784, 59, 60, 20, %WS_Child Or _
%WS_Visible Or %SS_Right, %WS_Ex_Left Or %WS_Ex_LtrReading
Control Add Label, hDlg, %IDC_BCURRENTLABEL, "Bright Current", 712, _
84, 90, 20
Control Add Label, hDlg, %IDC_BCURRENT, "0", 794, 83, 50, 20, _
%WS_Child Or %WS_Visible Or %SS_Right, %WS_Ex_Left Or _
%WS_Ex_LtrReading
Control Add Label, hDlg, %IDC_BSETLABEL, "Set Bright", 712, 108, 60, _
20
Control Add ComboBox, hDlg, %IDC_BCOMBOBOX, , 784, 108, 64, 200, _
%CBS_DropDownList Or %WS_Child Or %WS_Visible Or %WS_TabStop Or _
%WS_VScroll Or %CBS_DropDown, %WS_Ex_Left Or %WS_Ex_LtrReading Or _
%WS_Ex_RightScrollbar
Control Add Frame, hDlg, %IDC_CFRAME, "Contrast", 688, 155, 176, 152
Control Add Label, hDlg, %IDC_CMINLABEL, "Contr Min", 712, 187, 60, 20
Control Add Label, hDlg, %IDC_CMIN, "0", 784, 187, 60, 20, %WS_Child _
Or %WS_Visible Or %SS_Right, %WS_Ex_Left Or %WS_Ex_LtrReading
Control Add Label, hDlg, %IDC_CMAXLABEL, "Contr Max", 712, 210, 60, 20
Control Add Label, hDlg, %IDC_CMAX, "0", 784, 211, 60, 20, %WS_Child _
Or %WS_Visible Or %SS_Right, %WS_Ex_Left Or %WS_Ex_LtrReading
Control Add Label, hDlg, %IDC_CCURRENTLABEL, "Contr Current", 712, _
234, 90, 20
Control Add Label, hDlg, %IDC_CCURRENT, "0", 784, 233, 60, 20, _
%WS_Child Or %WS_Visible Or %SS_Right, %WS_Ex_Left Or _
%WS_Ex_LtrReading
Control Add Label, hDlg, %IDC_CSETLABEL, "Set Contr", 712, 257, 60, 20
Control Add ComboBox, hDlg, %IDC_CCOMBOBOX, , 784, 257, 64, 200, _
%CBS_DropDownList Or %WS_Child Or %WS_Visible Or %WS_TabStop Or _
%WS_VScroll Or %CBS_DropDown, %WS_Ex_Left Or %WS_Ex_LtrReading Or _
%WS_Ex_RightScrollbar
Control Add Frame, hDlg, %IDC_GFRAME, "Gamma", 688, 307, 176, 144
Control Add Label, hDlg, %IDC_GMINLABEL, "Gamma Min", 712, 339, 60, 20
Control Add Label, hDlg, %IDC_GMIN, "0", 784, 339, 60, 20, %WS_Child _
Or %WS_Visible Or %SS_Right, %WS_Ex_Left Or %WS_Ex_LtrReading
Control Add Label, hDlg, %IDC_GMAXLABEL, "Gamma Max", 712, 362, 60, 20
Control Add Label, hDlg, %IDC_GMAX, "0", 784, 363, 60, 20, %WS_Child _
Or %WS_Visible Or %SS_Right, %WS_Ex_Left Or %WS_Ex_LtrReading
Control Add Label, hDlg, %IDC_GCURRENTLABEL, "Gamma Current", 712, _
388, 90, 20
Control Add Label, hDlg, %IDC_GCURRENT, "0", 794, 387, 50, 20, _
%WS_Child Or %WS_Visible Or %SS_Right, %WS_Ex_Left Or _
%WS_Ex_LtrReading
Control Add Label, hDlg, %IDC_GSETLABEL, "Set Gamma", 712, 413, 60, 20
Control Add ComboBox, hDlg, %IDC_GCOMBOBOX, , 784, 413, 64, 200, _
%CBS_DropDownList Or %WS_Child Or %WS_Visible Or %WS_TabStop Or _
%WS_VScroll Or %CBS_DropDown, %WS_Ex_Left Or %WS_Ex_LtrReading Or _
%WS_Ex_RightScrollbar
Control Add Button, hDlg, %IDC_CAMBUTTON, "Configure Camera", 704, 464, _
160, 30
#PBForms END DIALOG
AtlAxWinInit ' // Initializes ATL
OcxName = "VIDEOCAPX.VideoCapXCtrl.1"
ProgID_VideoCapX = UCode$("VIDEOCAPX.VideoCapXCtrl.1")
LicKey_VideoCapX = UCode$("VideoCapX LITE ActiveX control - FathSoftware - All Rights Reserved")
hInst = GetModuleHandle(ByVal %NULL)
hOcx = CreateWindowEx(0, "STATIC", "", %WS_Child Or %WS_Visible Or %WS_TabStop, 12, 12, 640, 480, hDlg, ByVal 0, hInst, ByVal %NULL)
If hOcx=0 Then
MsgBox "Failure to create video control window.",%MB_Ok,"Initialize Error"
TerminateProcess GetCurrentProcess, 10
End If
hr = AtlAxCreateControlLic(StrPtr(ProgID_VideoCapX), hOcx, ByVal %NULL, ByVal %NULL, StrPtr(LicKey_VideoCapX))
If hr <> 0 Then
MsgBox "Failure to register the video control.",%MB_Ok,"Initialize Error"
TerminateProcess GetCurrentProcess, 10
End If
hr = AtlAxGetControl(hOcx, pUnk)
If hr <> 0 Or pUnk = 0 Then
MsgBox "Failure to get video control pointer.",%MB_Ok,"Initialize Error"
TerminateProcess GetCurrentProcess, 10
End If
If MakeDispatchVariant(pUnk, vVar)<>-1 Then
MsgBox "Failure to create the video control variant.", %MB_Ok,"Initialize Error"
TerminateProcess GetCurrentProcess, 10
End If
If Variant#(vVar)=0 Then
MsgBox "Failure to create the video control variant.", %MB_Ok,"Initialize Error"
TerminateProcess GetCurrentProcess, 10
End If
Set oOcx = vVar
' get VideoCapX OCX events like mouse down and mouse up
vcxEvents = Class "Class_Int__DVideoCapXEvents"
Events From oOcx Call vcxEvents
' check to make sure a video device is connected
vVar=0 As Long : Object Get oOcx.GetVideoDeviceCount To vVar : iMax=Variant#(vVar)
If iMax=0 Then ' need at least one video device input
MsgBox "No video device. Connect a video device and restart the program",%MB_Ok,"No Device Error"
TerminateProcess GetCurrentProcess, 10
Exit Function
End If
' configure the video device and connect
vVar=0 As Long : Object Let oOcx.VideoDeviceIndex=vVar ' get first video device in the list
vVar=15 As Long : Object Let oOcx.CaptureRate = vVar ' 15 frames/second
vVar=%FALSE As Long : Object Let oOcx.PreviewAudio = vVar ' no audio
vVar=%TRUE : Object Let oOcx.Connected = vVar ' connect to the device
vVar=0 As Long: Object Let oOcx.ColorFormat=vVar ' set color transfer format to RGB
vVar=640 As Long : vVar2=480 As Long : Object Call oOcx.SetVideoFormat(vVar, vVar2) ' 640 x 480 pixels
vVar=%TRUE As Long : Object Let oOcx.Preview = vVar ' preview the live video
Dialog Show Modal hDlg, Call ShowDIALOG1Proc To lRslt
#PBForms BEGIN CLEANUP %IDD_DIALOG1
#PBForms END CLEANUP
Terminate:
AtlAxWinTerm ' // Uninitializes ATL
Set oOcx = Nothing
Function = lRslt
End Function
' ATL UTILITY FUNCTIONS
'--------------------------------------------------------------------------------
Function AtlAxWinTerm () As Long
UnregisterClass ("AtlAxWin", GetModuleHandle(ByVal %NULL))
End Function
' ********************************************************************************************
' The IUnknown::AddRef method increments the reference count for an interface on an object. It
' should be called for every new copy of a pointer to an interface on a given object.
' ********************************************************************************************
Function IUnknown_AddRef (ByVal pthis As Dword Ptr) As Dword
Local DWRESULT As Dword
If IsFalse pthis Then Exit Function
Call Dword @@pthis[1] Using IUnknown_AddRef(pthis) To DWRESULT
Function = DWRESULT
End Function
' ********************************************************************************************
Sub AtlMakeDispatch(ByVal lpObj As Dword,ByRef vObj As Variant) Export
Local lpvObj As VARIANTAPI Ptr ' Pointer to a VARIANTAPI structure
Let vObj = Empty ' Make sure is empty to avoid memory leaks
lpvObj = VarPtr(vObj) ' Get the VARIANT address
@lpvObj.vt = %VT_Dispatch ' Mark it as containing a dispatch variable
@lpvObj.vd.pdispVal = lpObj ' Set the dispatch pointer address
IUnknown_AddRef lpObj ' Increment the reference counter -- added 12/05/05
End Sub
Function MakeDispatchVariant (ByVal lpObj As Dword, ByRef vObj As Variant) As Long
Local lpvObj As VARIANTAPI Ptr ' Pointer to a VARIANTAPI structure
Let vObj = Empty ' Make sure is empty to avoid memory leaks
If lpObj = 0 Then Exit Function ' Null pointer
lpvObj = VarPtr(vObj) ' Get the VARIANT address
@lpvObj.vt = %VT_Dispatch ' Mark it as containing a dispatch variable
@lpvObj.vd.pdispVal = lpObj ' Set the dispatch pointer address
IUnknown_AddRef lpObj ' Increment the reference counter
Function = -1
End Function
' VIDEOCAPX UTILITY FUNCTIONS
'--------------------------------------------------------------------------------
Function GetVideoProcAmpValueRange(ByVal inValue As Long, ByVal vArrayPtr As Dword) As Long
Local mDispatch As IDispatch
Local IID_NULL As Guid
Local MemberName As String
Local rgDispID As Dword
Local uExcepInfo As EXCEPINFO
Local puArgErr As Dword
Local uDispParams As DispParams
Local pv As VARIANTAPI Ptr
Local vResult As Variant
Local hr As Dword, i As Long
Dim vPrm (0 To 4) As Variant
Dim vLng (0 To 4) As Long
Dim vals(0 To 4) As Long At vArrayPtr
Set mDispatch = oOcx
MemberName = UCode$("GetVideoProcAmpValueRange")
hr = mDispatch.GetIDsOfNames(IID_NULL, MemberName, 1, 0, rgDispID)
vPrm(4) = inValue : vPrm(3) = Empty : vPrm(2) = Empty : vPrm(1) = Empty : vPrm(0) = Empty
For i=0 To 3
pv = VarPtr(vPrm(i))
@pv.vt = %VT_ByRef Or %VT_I4
@pv.vd.plVal = VarPtr(vLng(i))
Next i
'vPrm(4) = vVar : vPrm(3) = vVar2 : vPrm(2) = vVar3 : vPrm(1) = vVar4 : vPrm(0) = vVar5
uDispParams.CountArgs = 5
uDispParams.VariantArgs = VarPtr(vPrm(0))
hr = mDispatch.Invoke(rgDispID, IID_NULL, 0, %INVOKE_FUNC, uDispParams, vResult, _
VarPtr(uExcepInfo), puArgErr)
'MSGBOX HEX$(hr)
Local pvv As Variant Ptr
'LOCAL lVal AS LONG
pvv = uDispParams.VariantArgs
vals(3) = Variant#(@pvv[0]) : vals(2) = Variant#(@pvv[1]) : vals(1) = Variant#(@pvv[2]) : vals(0) = Variant#(@pvv[3])
Function=1
End Function
' INTERFACE GENERATED FROM THE PB10 COM BROWSER
'
' Interface Name : Int__DVideoCapXEvents
' Description : Event interface for VideoCapX Control
' ClassID : $CLSID_VIDEOCAPXLib_Event__DVideoCapXEvents
' Version ProgID : $PROGID_VIDEOCAPXLib_VideoCapX1
Class Class_Int__DVideoCapXEvents $CLSID_VIDEOCAPXLib_Event__DVideoCapXEvents As Event
Interface Int__DVideoCapXEvents $IID_VIDEOCAPXLib_Int__DVideoCapXEvents
Inherit IDispatch
Method CaptureStart <1> ()
' Insert your code here
End Method
Method CaptureEnd <2> ()
' Insert your code here
End Method
Method Click<-600> ()
' Insert your code here
End Method
Method DblClick<-601> ()
' Insert your code here
End Method
Method ConnectionRequest <3> (ByVal FromAddress As WString, ByRef Cancel As Long)
' Insert your code here
End Method
Method PlayerEnd <4> ()
' Insert your code here
End Method
Method PlayerChangeState <5> (ByVal NewState As Long)
' Insert your code here
End Method
Method RecompressCompleted <6> ()
' Insert your code here
End Method
Method MouseDown <-605> (ByVal Button As Integer, ByVal PB_Shift As Integer, ByVal x As Long, ByVal y As Long)
MousePtr 11 To lastMousePtr
End Method
Method MouseMove <-606> (ByVal Button As Integer, ByVal PB_Shift As Integer, ByVal x As Long, ByVal y As Long)
' Insert your code here
End Method
Method MouseUp <-607> (ByVal Button As Integer, ByVal PB_Shift As Integer, ByVal x As Long, ByVal y As Long)
If lastMousePtr=0 Then lastMousePtr=1 : MousePtr lastMousePtr : lastMousePtr=1
End Method
Method KeyDown <-602> (ByRef KeyCode As Integer, ByVal PB_Shift As Integer)
' Insert your code here
End Method
Method KeyPress <-603> (ByRef KeyAscii As Integer)
' Insert your code here
End Method
Method KeyUp <-604> (ByRef KeyCode As Integer, ByVal PB_Shift As Integer)
' Insert your code here
End Method
Method FullscreenLost <7> ()
' Insert your code here
End Method
Method RecompressProgress <8> (ByVal nPercent As Long, ByRef Cancel As Long)
' Insert your code here
End Method
Method CaptureReady <9> ()
' Insert your code here
End Method
Method DeviceLost <10> ()
' Insert your code here
End Method
Method NewFrame <11> ()
' Insert your code here
End Method
Method OnStatus <12> (ByVal Status As Long, ByVal hr As Long)
' Insert your code here
End Method
Method HTTPUploadProgress <13> (ByVal Percent As Long, ByRef Cancel As Long)
' Insert your code here
End Method
Method ConnectionClosed <14> (ByVal RemoteAddress As WString, ByVal ErrorCode As Long)
' Insert your code here
End Method
Method TextReceived <15> (ByVal t As WString)
' Insert your code here
End Method
Method ConnectionEstablished <16> (ByVal StatusCode As Long, ByVal RemoteAddress As WString)
' Insert your code here
End Method
End Interface
End Class
http://www.garybeene.com/sw/gbsnippets.htm