Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compile Exe
#Dim All
%Unicode = 1
#Include "Win32API.inc"
#Include Once "dshow.inc"
#Include Once "dshow_utilities.inc"
Global Camera$
Function PBMain() As Long
Dialog New Pixels, 0, "Display Named Camera: " + Camera$,,,640,480, %WS_OverlappedWindow Or %WS_ClipChildren To hDlg
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Local w,h,fBits As Long
Select Case Cb.Msg
Case %WM_InitDialog
CameraIndex = 0
Camera$ = "HD Pro Webcam C920"
GetMatchingMoniker
DisplayNamedCamera
GetCurrentFormat w,h,fBits
Dialog Set Text hDlg, "Display Named Camera: " + Camera$ + " " + Str$(w) + Str$(h) + Str$(fBits) + " " + Time$
Case %WM_Size
Dialog Get Client hDlg To w,h
pWindow.SetWindowPosition(0,0,w,h)
End Select
End Function
http://www.garybeene.com/sw/gbsnippets.htm