-
>>When running the following program, it takes the same picture from the same camera.<<
Does it report a different device name and id each time? You could try a DoEvents/Sleep in the loop.
Also, try calling CommonDialog1.ShowSelectDevice to make sure each camera is supported.
>> how can I adjust its brightness. <<
I'd suggest breaking it up a bit and looking around.
Code:
Set oDevice = DeviceManager1.DeviceInfos(i).Connect
' See what properties the device supports...
CommonDialog1.ShowDeviceProperties(oDevice)
Set oItem = oDevice.ExecuteCommand(wiaCommandTakePicture)
' See what properties the image supports...
CommonDialog1.ShowItemProperties(oItem)
Set oImage = oItem.Transfer
' or Set oImage = CommonDialog1.ShowTransfer(oItem)
Both the device and the item support a properties collection so have a look around. the oItem represents the picture on the camera before it is downloaded to the computer. Have a look at the other methods on CommonDialog.
-
>>Does it report a different device name and id each time?
Yes, it reports ids:
Code:
{...}\000;
{....}\007(I don't know why it is 007, probably according to the USB port. By the way, I have 8 USB ports on my computer);
{....}\002
Also, I can see the lights on the the three receivers flashed from red to green. So I am sure it functions from different channel.
Oh, I got a tricky problem now. When last time channel 1 cam is used in the webcam own software, the picture will be taken differently at the first two pictures. However, when last time channel 2 or 3 is used, the three pictures will be the same.
>>You could try a DoEvents/Sleep in the loop.
How can I write such a loop? Could you give me details?
Also, try calling CommonDialog1.ShowSelectDevice to make sure each camera is supported.
>>I'd suggest breaking it up a bit and looking around.
I will try your code.
Thank you so much
David
-
>>How can I write such a loop? Could you give me details?<<
Try adding this in the loop.
Code:
' At top of module
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
...
DoEvents
Sleep(1000) ' one second
DoEvents
EDIT: I'm signing off for now.
-
I tried showing device properties, but all are not available, however, except one can't take picture properly, the other two take pictures correctly.
I will try the sleep next monday. I am not going to work more this week.
Thanks
David