Home > Software engineering >  Can you tell me the great spirit vb control Canon camera taking pictures?
Can you tell me the great spirit vb control Canon camera taking pictures?

Time:09-27

Bought a Canon 100 d, installed the EOS Utility can realize computer control after photos: 1. Press the return key, or (2) direct the mouse to click the photo button,

But I think in my program to control directly, then reads picture edit, is the great god, how in my program to control?

I wrote a code, after the activation process, press the blank space key, but can't achieve!

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal Scan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub Command1_Click ()
Dim a2 As Integer
Dim str1 As Object
AppActivate "EOS Utility" 'this is the name of the camera
Sleep 600
Call keybd_event (32, 0, 0, 0) 'perform space operations
Form1. Show application form
End Sub

CodePudding user response:

You write that there must be some problem, first take a look at manual, keybd_event this statement right? Call to?

CodePudding user response:

reference 1st floor pipi20151001 response:
write like you must have a problem, first take a look at the manual, keybd_event this statement right? Call to?
thank you for reminding me, suddenly have a idea, tested, success! Is indeed a key event, but not claim problem, is to press down, not followed up.
  • Related