PDA

View Full Version : Exception with VCDPropertyItems



karlski
July 12, 2010, 23:27:40
I'm a rusty one time VB5 programmer who wants to get up to speed with VB.NET 2008 using TIS equipment.
I got an exception error with the simple code below, which I adapted from the Adjust Image Settings section.
The exception was with the line starting with "TrackBar1.Minimum".
The message was VCDSimpleProperty: Range Property 284c0e06-010b-45bf-8291-09d90a459b28 not found.

After 2 hours searching, I still don't know how to fix it.

I am using a TIS DFx61BUC02 camera. If I comment out both the TrackBar statements, I get a live image from the camera. I followed the online instructions, although the files in my 'common' folder are somewhat different to those stated in the Adjust Image Settings section of the online text.

I am finding my feet and probably committing newbie errors, so please bear with me!

======================== CODE ==========
Imports TIS.Imaging.VCDHelpers
Imports TIS.Imaging


Public Class Form1
Private VCDProp As VCDSimpleProperty

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Automatically start the default TIS camera
IcImagingControl1.LiveStart()
VCDProp = VCDHelpers.VCDSimpleModule.GetSimplePropertyContai ner(IcImagingControl1.VCDPropertyItems)

' Setup the range of the brightness slider.
TrackBar1.Minimum = VCDProp.RangeMin(VCDIDs.VCDID_Brightness)
TrackBar1.Maximum = VCDProp.RangeMax(VCDIDs.VCDID_Brightness)

End Sub
End Class
============================

Stefan Geissler
July 14, 2010, 09:13:45
Hello,

the reason for the exception is, the camera has no brightness property. You can see this using IC Capture. With
VCDProp.Available(VCDIDs.VCDID_Brightness)
you can check, whether a property is available.