Simple Camera Tethering Using WIA
-
I'm a freelance studio/event photographer. For years I've had to use often expensive and complex software to tether my cameras to my laptop. I needed a fast, lightweight tool to do the job without all the cumbersome tools, so as the saying goes "if you want it done right, do it yourself". Here is a quick and simple framework for tethering Nikon cameras with near instant file transfer and image viewing. This is just a vb.net framework and should be modified to suit your taste. Have fun... Imports WIA Imports System.Runtime.InteropServices Imports System.Environment Imports System.IO 'Add reference to wiaaut.dll located in \Windows\System32 'Add Panel1 with Dock=Fill and BackgroundImage=Zoom 'Form1.text = Waiting... Public Class Form1 Public Const wiaEventItemCreated = "{4C8F4EF5-E14F-11D2-B326-00C04F68CE61}" Public Const wiaEventDeviceConnected = "{A28BBADE-64B6-11D2-A231-00C04FA31809}" Public Const wiaEventDeviceDisconnected = "{143E4E83-6497-11D2-A231-00C04FA31809}" Public WIA_Dialog As New WIA.CommonDialog Public WIA_DeviceMgr As New WIA.DeviceManager Public WIA_Device As WIA.Device Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load WIA_DeviceMgr.RegisterEvent(wiaEventItemCreated, "*") WIA_DeviceMgr.RegisterEvent(wiaEventDeviceConnected, "*") WIA_DeviceMgr.RegisterEvent(wiaEventDeviceDisconnected, "*") AddHandler WIA_DeviceMgr.OnEvent, AddressOf Me.WIA_OnEvent End Sub Private Sub WIA_OnEvent(ByVal EventID As String, ByVal DeviceID As String, ByVal ItemId As String) Dim device As String If EventID = wiaEventDeviceConnected Then Try 'set param2 to False to automatically select the device 'set param2 to True to show device select dialog WIA_Device = WIA_Dialog.ShowSelectDevice(WiaDeviceType.CameraDeviceType, False, True) 'display device information device = "Connected To " For Each prop As WIA.Property In WIA_Device.Properties Select Case prop.Name Case "Manufacturer" device += prop.Value.ToString & " " Case "Description" device += prop.Value.ToString End Select Next Me.Text = device Catch ex As Exception Debug.WriteLine("E
-
I'm a freelance studio/event photographer. For years I've had to use often expensive and complex software to tether my cameras to my laptop. I needed a fast, lightweight tool to do the job without all the cumbersome tools, so as the saying goes "if you want it done right, do it yourself". Here is a quick and simple framework for tethering Nikon cameras with near instant file transfer and image viewing. This is just a vb.net framework and should be modified to suit your taste. Have fun... Imports WIA Imports System.Runtime.InteropServices Imports System.Environment Imports System.IO 'Add reference to wiaaut.dll located in \Windows\System32 'Add Panel1 with Dock=Fill and BackgroundImage=Zoom 'Form1.text = Waiting... Public Class Form1 Public Const wiaEventItemCreated = "{4C8F4EF5-E14F-11D2-B326-00C04F68CE61}" Public Const wiaEventDeviceConnected = "{A28BBADE-64B6-11D2-A231-00C04FA31809}" Public Const wiaEventDeviceDisconnected = "{143E4E83-6497-11D2-A231-00C04FA31809}" Public WIA_Dialog As New WIA.CommonDialog Public WIA_DeviceMgr As New WIA.DeviceManager Public WIA_Device As WIA.Device Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load WIA_DeviceMgr.RegisterEvent(wiaEventItemCreated, "*") WIA_DeviceMgr.RegisterEvent(wiaEventDeviceConnected, "*") WIA_DeviceMgr.RegisterEvent(wiaEventDeviceDisconnected, "*") AddHandler WIA_DeviceMgr.OnEvent, AddressOf Me.WIA_OnEvent End Sub Private Sub WIA_OnEvent(ByVal EventID As String, ByVal DeviceID As String, ByVal ItemId As String) Dim device As String If EventID = wiaEventDeviceConnected Then Try 'set param2 to False to automatically select the device 'set param2 to True to show device select dialog WIA_Device = WIA_Dialog.ShowSelectDevice(WiaDeviceType.CameraDeviceType, False, True) 'display device information device = "Connected To " For Each prop As WIA.Property In WIA_Device.Properties Select Case prop.Name Case "Manufacturer" device += prop.Value.ToString & " " Case "Description" device += prop.Value.ToString End Select Next Me.Text = device Catch ex As Exception Debug.WriteLine("E
Perhaps you should make this a tip?
-
I'm a freelance studio/event photographer. For years I've had to use often expensive and complex software to tether my cameras to my laptop. I needed a fast, lightweight tool to do the job without all the cumbersome tools, so as the saying goes "if you want it done right, do it yourself". Here is a quick and simple framework for tethering Nikon cameras with near instant file transfer and image viewing. This is just a vb.net framework and should be modified to suit your taste. Have fun... Imports WIA Imports System.Runtime.InteropServices Imports System.Environment Imports System.IO 'Add reference to wiaaut.dll located in \Windows\System32 'Add Panel1 with Dock=Fill and BackgroundImage=Zoom 'Form1.text = Waiting... Public Class Form1 Public Const wiaEventItemCreated = "{4C8F4EF5-E14F-11D2-B326-00C04F68CE61}" Public Const wiaEventDeviceConnected = "{A28BBADE-64B6-11D2-A231-00C04FA31809}" Public Const wiaEventDeviceDisconnected = "{143E4E83-6497-11D2-A231-00C04FA31809}" Public WIA_Dialog As New WIA.CommonDialog Public WIA_DeviceMgr As New WIA.DeviceManager Public WIA_Device As WIA.Device Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load WIA_DeviceMgr.RegisterEvent(wiaEventItemCreated, "*") WIA_DeviceMgr.RegisterEvent(wiaEventDeviceConnected, "*") WIA_DeviceMgr.RegisterEvent(wiaEventDeviceDisconnected, "*") AddHandler WIA_DeviceMgr.OnEvent, AddressOf Me.WIA_OnEvent End Sub Private Sub WIA_OnEvent(ByVal EventID As String, ByVal DeviceID As String, ByVal ItemId As String) Dim device As String If EventID = wiaEventDeviceConnected Then Try 'set param2 to False to automatically select the device 'set param2 to True to show device select dialog WIA_Device = WIA_Dialog.ShowSelectDevice(WiaDeviceType.CameraDeviceType, False, True) 'display device information device = "Connected To " For Each prop As WIA.Property In WIA_Device.Properties Select Case prop.Name Case "Manufacturer" device += prop.Value.ToString & " " Case "Description" device += prop.Value.ToString End Select Next Me.Text = device Catch ex As Exception Debug.WriteLine("E