Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/10/2005, 13:17
LeandroA
 
Fecha de Ingreso: abril-2005
Mensajes: 351
Antigüedad: 19 años
Puntos: 3
Hola Aldo lo puedes hacer mediante "FindWindow" y porsupuesto con el "classname" del "ciber control 5.0" (si no sabes como obtenerlo te explico)

yo te paso un ejemplo con internet Explorer, su className es "IEFrame" bien cuando se inicie creara un archivo Eventos.txt en C:\ e ira imprimiendo cuando se abre y se cierra

agrega un timer y el codigo

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Dim Abierto As Boolean
Private Sub Form_Load()
Timer1.Interval = 1000
End Sub

Private Sub Timer1_Timer()
Dim mWnd As Long
Dim ClassName As String
ClassName = "IEFrame" 'aqui cambia por el classname de el "ciber control 5.0"
mWnd = FindWindow(ClassName, vbNullString)

If mWnd = 0 Then
If Abierto Then
Open "C:\Eventos.txt" For Append As #1
Print #1, "Fin de la Aplicacion Internet Explorer " & vbTab & vbTab & Now
Print #1, "-------------------------------------------------------------------"
Close #1
Abierto = False
End If
Else
If Not Abierto Then
Open "C:\Eventos.txt" For Append As #1
Print #1, "Inicio de la Aplicacion Internet Explorer " & vbTab & Now
Close #1
Abierto = True
End If
End If
End Sub


Saludos