Home
04 ISC 071 MANUAL TECNICO
Contents
1. i 1 Else UpdateControls True True False False MsgBox Reproducci n Terminada vblnformation ij Terminaci n frmMouseregistra Show End If End Sub TOMAR CONTROL DEL ESTUDI ANTE PROFESOR Private Declare Function BitBlt Lib gdi32 ByVal hDestDC As Long ByVal X As Long ByVal Y As Long ByVal nWidth As Long ByVal nHeight As Long ByVal hSrcDC As Long ByVal xSrc As Long ByVal ySrc As Long ByVal dwRop As Long As Long Private Const SRCCOPY amp HCC0020 Dim RecDib As New cDIBSection Dim ZLib As New clsZLib Dim i As Long Dim tmpPos As String Dim pos 1 As Long Const CRate 5 Lorena Guisela J aramillo Mediavilla 22 UTN FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA Private Sub Command1_Click Sale de la Captura Unload frmCapture frmMain Visible True modClient ReconnectToServer End Sub Private Sub Form_KeyDown KeyCode As Integer Shift As Integer Env a el c digo de la tecla precionada y espera para responder Dim bKeys As Byte bKeys CByte KeyCode TCP KB SendData bKeys Do Until KbReply DoEvents Loop KbReply False End Sub Private Sub Form_Load Obtiene el reciente desktop del servidor modClient Reply False frmMain wskMain SendData modClient GetRect Espera para replicar Do Until modClient Reply DoEvents Loop modClient Reply False pone la forma en la esquina superior izquierda Me Top 0 Me Left 0 Si
2. Dim codins As String Dim insniv1 As String seteo lo que declare arriba Set dbt New ADODB Connection Set romp New ADODB Recordset Set rsidmate New ADODB Recordset Set rsmateria New ADODB Recordset Set rsidniv New ADODB Recordset Set rsniveles New ADODB Recordset Set rsmatinsc New ADODB Recordset Set rsinsc New ADODB Recordset Set rsinsniv New ADODB Recordset dbt ConnectionString dsn educacion dbt Open If idestu lt gt Then idprol rsinsc Open SELECT Cod Inscripcion From Inscripciones WHERE Id_estudiante idestu amp dbt adOpenStatic adLockReadOnly adCmdText codins rsinsc 0 rsinsc Close rsinsc Open SELECT Id nivel From Inscripciones WHERE Id_estudiante amp idestu dbt adOpenStatic adLockReadOnly adCmdText insnivl rsinsc 0 rsmatinsc Open SELECT id profesor From Matlnsc WHERE Cod_inscripcion codins amp dbt adOpenStatic adLockReadOnly adCmdText idprol rsmatinsc 0 rbmp Open SELECT From ProfMateNiv WHERE ld profesor idprol and Id nivel insniv1 dbt adOpenStatic adLockReadOnly adCmdText Lorena Guisela J aramillo Mediavilla 4 UTN FICA EI SIC Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA desidmate desmate desidniv With romp Do While Not EOF rsidmate Open SELECT Id Materia From Materias WHERE ld_Material amp rbmp id materia am
3. FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA If idexam Then pregexa Open SELECT from Examenes linea dbt adOpenDynamic adLockOptimistic adCmdText With pregexa If Not BOF And EOF Then slastrecord Bookmark MoveLast End If AddNew IId examen Trim idexam Idescripcion desexa ld_ pregunta Val idpreg Ipregunta Trim preg lop1 Trim opc1 lop2 Trim opc2 lop3 Trim opc3 lop4 Trim opc4 lop5 Trim opc5 lrespuesta Val respu Itipopregunta Trim tipopreg IValor pregunta Val valorpreg Itiempo respuesta Val tiemporesp Update End With pregexa Close Set pregexa Nothing End If dbt Close Set dbt Nothing End Sub FUNCION QUE PERMITE ACCEDER A LOS EXAMENES QUE SOLICITA EL ESTUDI ANTE PARA CONTESTARLOS Public Sub solicitaexa soidpro As String soidnivel As String soidmate As String soidestud As String Dim dbt As ADODB Connection Dim rsexamp As ADODB Recordset Dim rspun As ADODB Recordset Dim contes nexa cont As Integer Dim contestado 10 As String Set dbt New ADODB Connection Set rsexamp New ADODB Re cordset Set rspunt New ADODB Recordset Lorena Guisela J aramillo Mediavilla UTN FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA dbt ConnectionString dsn educacion dbt Open idsoexamen contestados contes 0 cont 0 If soidpro lt gt Then rsexamp Open SELECT
4. from Materias where Id_Materia rbmp id materia amp dbt adOpenDynamic adLockOptimistic adCmdText MAterias rsmateria Open select Descripcion from Materias where Id_Materia rbmp id materia amp dbt adOpenStatic adLockReadOnly adCmdText MAterias rsidniv Open select Id Nivel from Niveles where Id_Nivel rbmp id nivel dbt adOpenStatic adLockReadOnly adCmdText Niveles rsniveles Open select Descripcion from Niveles where Id Nivel z rbmplid nivel dbt adOpenStatic adLockReadOnly adCmdText Niveles desidmate desidmate rsidmate 0 desmate desmate rsmateria 0 desidniv desidniv amp rsidniv 0 amp desniv desniv amp rsniveles 0 amp rsidmate Close rsmateria Close rsidniv Close rsniveles Close MoveNext Loop End With rbmp Close Set romp Nothing End If dbt Close Set dbt Nothing End Sub BUSCA ACCESO DI FERENTES MATERI AS O CURSOS PARA ESTUDI ANTES Public Sub buscomateestu idestu As String Dim dbt As ADODB Connection Lorena Guisela J aramillo Mediavilla UTN FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA Dim rbmp As ADODB Recordset Dim rsmateria As ADODB Recordset Dim rsidmate As ADODB Recordset Dim rsidniv As ADODB Recordset Dim rsniveles As ADODB Recordset Dim rsmatinsc As ADODB Recordset Dim rsinsc As ADODB Recordset Dim rsinsniv As ADODB Recordset
5. i 0 End Sub Lorena Guisela J aramillo Mediavilla 25
6. repidestu As String puntestu As String contestu As Boolean Dim dbt As ADODB Connection Dim rsrespuesta As ADODB Recordset Dim rsexam As ADODB Recordset Dim ayuda As String Set dbt New ADODB Connection Set rsrespuesta New ADODB Recordset Set rsexam New ADODB Recordset dbt ConnectionString dsn educacion dbt Open If respidexam lt gt Then rsrespuesta Open SELECT from Puntajes dbt adOpenDynamic adCmdText rsexam Open SELECT from Examatprofniv dbt adOpenDynamic adCmdText With rsrespuesta If Not BOF And EOF Then Lorena Guisela J aramillo Mediavilla adLockOptimistic adLockOptimistic 11 UTN FI CA El SI C Tesis de Grado Transmisi n Satelital slastrecord Bookmark MoveLast End If AddNew lid examenlinea Trim respidexam ayuda id examenlinea lid estudiante Trim repidestu IPuntaje Val puntestu Icontestado 0 contestu Update End With With rsexam Do While Not EOF If rsexam Id examen ayuda Then Icontestado 1 Exit Do End If MoveNext Loop Update End With rsrespuesta Close Set rsrespuesta Nothing End If dbt Close Set dbt Nothing End Sub Manual T cnico SI SLEA ACCEDER A LOS EXAMENES QUE HAN SI DO CONTESTADOS Public Sub vercontestados vidp As String vidniv As String vidmat As String Dim dbt As ADODB Connection Dim rsconex As ADODB Recordset Set dbt New ADODB Connection Set rsconex 2 New ADODB Recordset dbt Connection
7. ByVal cy As Long ByVal wFlags As Long As Long Declare Function DestroyWindow Lib user32 ByVal hndw As Long As Boolean Declare Function GetSystemMetrics Lib user32 ByVal nIndex As Long As Long Declare Function SetWindowText lib user32 Alias SetWindowTextA ByVal hWnd As Long ByVal IpString As String As Long Public IwndC As Long Cabecera para laventana de captura Function MyFrameCallback ByVal Iwnd As Long ByVal IpVHdr As Long As Long Debug Print FrameCallBack Dim VideoHeader As VIDEOHDR Dim VideoData As Byte RtIMoveMemory VarPtr VideoHeader IpVHdr Len VideoHeader ReDim VideoData VideoHeader dwBytesUsed Copia datos dentro del array RtIMoveMemory VarPtr VideoData 0 VideoHeader IpData VideoHeader dwBytesUsed Debug Print VideoHeader dwBytesUsed Debug Print VideoData End Function Function MyYieldCallback Iwnd As Long As Long Debug Print Yield End Function Function MyErrorCallback ByVal Iwnd As Long ByVal ilD As Long ByVal ipstrStatusText As Long As Long If ilD 0 Then Exit Function Dim sStatusText As String Dim usStatusText As String sStatusText String 255 0 IStrCpy StrPtr sStatusText ipstrStatusText sStatusText Left sStatusText InStr sStatusText Chr 0 1 usStatusText StrConv sStatusText vbUnicode LogError usStatusText il D End Function Function MyStatusCallback ByVal Iwnd As Long ByVal ilD As Long ByVal ipstrStatusText As Long As Long If ilD 2 0 Then Exit Functi
8. Connection Set rslistado New ADODB Recordset Set rslistestu New ADODB Recordset Set rslistnot New ADODB Recordset Set rsnomestu New ADODB Recordset dbt ConnectionString dsn educacion dbt Open If lidpo lt gt Then listnomes listnotl rslistado Open SELECT from Matlnsc WHERE Id_profesor lidpo amp and Id Nivel z lidnivel and Id materia 2 lidmat dbt adOpenStatic adLockReadOnly adCmdText With rslistado Do While Not EOF rslistestu Open SELECT Cod Inscripcion Id Estudiante From Inscripciones WHERE Cod Inscripcion 2 rslistado Cod Inscripcion dbt adOpenStatic adLockReadOnly adCmdText rsnomestu Open SELECT Id Estudiante Nombres Apellidos from Estudiantes WHERE Id estudiante rslistestu 1 dbt adOpenStatic adLockReadOnly adCmdText nomauxes rsnomestu 0 amp amp rsnomestu 1 amp Chr 32 amp rsnomestu 2 listnomes listnomes amp nomauxes amp rsnomestu Close rslistestu Close MoveNext Loop End With rslistado Close Set rslistado Nothing dbt Close Set dbt Nothing Set rsnomestu Nothing Set rslistestu Nothing End If End Sub GUARDAR EXAMENES DE ACUERDO A LOS DOCENTES Y MATERIAS ASI GNADAS Lorena Guisela J aramillo Mediavilla Public Sub examenes eidmat As String eidniv As String eidpro As String pastem As String edesexa As String Dim dbt As ADODB Connection Dim rsexa As ADODB Recor
9. ZLib DecompressByte ByteArray DoEvents Realizo un DIB desde la serie de bytes Call RecDib ParseByte ByteArray y finalmente ponemos el blit a la posici n real Ret BitBlt pVideo hdc pos 0 pos 1 dx CRate dy CRate RecDib hdc 0 0 SRCCOPY env o algunas r plicas no importa lo que usted env e Yo pienso que ser a mejor enviar un byte TCP SendData a End Sub Private Sub TCP KB DataArrival ByVal BytesTotal As Long El servidor env a una r plica al comando del teclado KbReply True End Sub Private Sub TCP Mouse DataArrival ByVal BytesTotal As Long El servidor env a una r plica al comando del mouse Lorena Guisela J aramillo Mediavilla 24 UTN FICA EI SIC Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA MouseReply True End Sub Private Sub TCP_Set_DataArrival ByVal BytesTotal As Long el servidor nos dice la posici n real para el blitting Dim tmp As String TCP_Set GetData tmp vbString tmpPos Split tmp pos 0 CLng tmpPos 0 pos 1 CLng tmpPos 1 TCP Set SendData a End Sub Public Sub CapConnect conecta todos los datos a los sockets Dim strHost As String strHost modClient Remotel P TCP Connect strHost 2213 TCP Set Connect strHost 2214 TCP Mouse Connect strHost 2215 TCP KB Connect strHost 2216 crea u dispositivo independiente de bitmap con 16 colores RecDib Colors 16 Call RecDib Create dx CRate dy CRate
10. from Examatprofniv WHERE Id_profesor soidpro and Id materia 2 soidmate and ld nivel 2 amp soidnivel dbt adOpenStatic adLockReadOnly adCmdText rspunt Open SELECT from Puntajes WHERE Id estudiante soidestud dbt adOpenStatic adLockReadOnly adCmdText With rsexamp If Not BOF And EOF Then Do While Not EOF nexa nexa 1 MoveNext Loop Else nexa 1 End If MoveFirst Do While Not EOF cont cont 1 With rspunt If contes 0 Then MoveFirst End If If Not rspunt BOF And rspunt EOF Then Do While Not EOF If rsexamp ld examen rspunt id examenlinea And rsexamp contestado 1 Then contes contes 1 contestado contes rsexamp ld examen End If MoveNext Loop Else idsoexamen idsoexamen amp rsexamp ld examen rsexamp descripcion amp End If End With If contes 0 Then If rsexamp ld examen lt gt contestado contes Then idsoexamen idsoexamen amp rsexamp ld examen rsexamp descripcion amp End If End If Lorena Guisela J aramillo Mediavilla 9 UTN FICA EI SIC Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA MoveNext Loop End With rspunt Close rsexamp Close Set rspunt Nothing Set rsexamp Nothing contestados Str contes End If dbt Close Set dbt Nothing End Sub Public Sub pidepregunta pidexa As String Dim dbt As ADODB Connection Dim preg As ADODB Recordset Set d
11. rc As Long If Not wStream Playing And _ Not wStream Recording And _ wStream RecDeviceFree And _ wStream PlayDeviceFree Then Chequeo el estado del dispositivo de audio wStream Recording True cmdtalk Caption amp Hablando Screen MousePointer vbHourglass outLight Picture Imglcons Listl mages mikeON Picture outLight Refresh rc wStream RecordWave Me hWnd TCPSocket Grabando voz y envio a todos los Sockets conectados outLight Picture Imglcons Listl mages mikeOFF Picture outLight Refresh Screen MousePointer vbDefault cmatalk Caption amp Hablar Lorena Guisela J aramillo Mediavilla 15 UTN FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA If Not wStream Playing And _ wStream PlayDeviceFree And _ wStream RecDeviceFree Then Est el dispositivo de audio libre Call cmdTalk Click Activa el Playback De Cualquier Mensaje Entrante End If End If End Sub Funci n que permite la grabaci n del sonido Private Sub cmdTalk MouseUp Button As Integer Shift As Integer X As Single Y As Single wStream Recording False Para la Grabaci n End Sub Controla que exista la conexi n Private Sub connecta Click Dim Idx As Long Idx InstanceTCP TCPSocket Control de Instacia de TCP If Idx gt 0 Then connecta Enabled False ConnectionList Enabled False On Error Resume Next If Not Connect TCPSocket I dx txtServer Text VOI CEPORT Then Intento conectar Unl
12. MiddleButton Estado del Bot n centro Cursor i RButton CBool GetAsyncKeyState vbRightButton Estado del Bot n derecho If i Samples And Not Esc Then i 1 Else j i 1 UpdateControls True True False False MsgBox Grabaci n Terminada vbl nformation Terminado Res CurrentResolution Updatelnfo FN Res CStr Now j SPS HW frmMouseregistra Show End If End Sub Public Sub Play SetCursorPos Cursor i pos X Cursor i pos Y Lorena Guisela J aramillo Mediavilla 21 UTN FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA regenera los eventos del bot n izquierdo del mouse If Not pLB And Cursor i LButton Then mouse event MOUSEEVENTF_LEFTDOWN O O O If pLB And Not Cursor i LButton Then mouse event MOUSEEVENTF LEFTUP 0 0 0 0 regenera los eventos del bot n centro del mouse If Not pMB And Cursor i MButton Then mouse event MOUSEEVENTF MIDDLEDOWN 0 0 0 0 If pMB And Not Cursor i MButton Then mouse event MOUSEEVENTF MIDDLEUP 0 0 0 regenera los eventos del bot n derecho del mouse If Not pRB And Cursor i RButton Then mouse event MOUSEEVENTF RIGHTDOWN O O 0 0 If pRB And Not Cursor i RButton Then mouse event MOUSEEVENTF RIGHTUP 0 0 0 0 en caso de parar presionamos la tecla ESC Esc CBool GetAsyncKeyState vbKeyEscape If i lt j And Not Esc Then pLB Cursor i LButton pMB Cursor i MButton pRB Cursor i RButton
13. String DSN educacion dbt Open If vidp lt gt Then rsconex Open SELECT from Examatprofniv WHERE Id_profesor vidp and Id_materia vidmat and ld nivel vidniv dbt adOpenStatic adLockReadOnly adCmdText Lorena Guisela J aramillo Mediavilla 12 UTN FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA With rsconex Do While Not EOF enviexacon enviexacon amp Id_examen Idescripcion MoveNext Loop End With rsconex Close Set rsconex Nothing End If dbt Close Set dbt Nothing End Sub VI SUALI ZAR LOS PUNTAJ ES DE CADA EXAMEN Public Sub verpuntajes pidprol As String pidnivell As String pidmatl As String pidestul As String Dim dbt As ADODB Connection Dim preg As ADODB Recordset Dim preg1 As ADODB Recordset Dim sqlwhat As String sqlwhere As String Dim sqlstring As String vl As String Set dbt New ADODB Connection Set preg New ADODB Recordset Set preg1 New ADODB Recordset dbt ConnectionString DSN educacion dbt Open vl 1 sqlwhat SELECT Examatprofniv ld examen as idexaml Examatprofniv Descripcion as descril Puntajes Puntaje as puntajel FROM Examatprofniv _ amp INNER JOIN Puntajes ON Examatprofniv Id_examen Puntajes ld examenlinea sqlwhere WHERE Examatprofniv Id _profesor amp pidprol AND Examatprofniv Id_materia pidmatl AND Examatprofniv Id_
14. TN FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA GRABA MOVI MI ENTOS DEL MOUSE Private Sub cmdRecord Click On Error GoTo Error Calcule el n mero total de Muestras para ser Grabado Samples SPS Val InputBox N mero de segundos para la grabaci n No Cambiar la Resoluci n de la Pantalla mientras Graba If Samples lt 0 Then Exit Sub Aborta la grabanci n sin nada grabado i20 Inicializa contador de muestras ReDim Cursor Samples Redimienciona el estdo del array del cursor UpdateControls False False True False Actualiza controles UnSaved True Movimientos todav a no grabados HW CBool chkHide Value Graba la opci n para aplicar a la reproducci n If HW Then Me Hide Debe Esconder la Ventana mientras est Grabando Exit Sub Error MsgBox Error Tiempo de Grabaci n demasiado largo vbCritical Error End Sub Private Sub cmdPlay Click Verifique para ver si la actual resoluci n empareja la resoluci n del archivo grabado If Res CurrentResolution Then If MsgBox Su resoluci n de la pantalla actual no empareja la resoluci n del archivo a reproducir Est seguro que desea continuar vbCritical Or vbYesNo No se adapta a la resoluci n 2 vbNo Then Exit Sub End If pz Inicializa el reproductor Ifj lt 0 Then Exit Sub Aborta el reproductor si no se est ejecutando UpdateControls False False False True Actualiza Controles If HW Then Me Hide Debe Esconde
15. UTN FI CA EI SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA MANUAL TECNI CO Para la implementar el Sistema de Educaci n se utiliz Visual Basic 6 0 en donde se utiliz herramientas propias de este programa para de esta manera satisfacer los requerimientos iniciales del sistema A continuaci n se describen los m dulos del sistema y su respectiva programaci n CONTROL MASTER Este m dulo contiene lo que concierne a la administraci n del sistema Acceso a los datos y obtenci n de los mismos mediante la Base de Datos creada en SQL 2000 Server Las funciones que se utilizaron para acceder a los datos son las siguientes BUSCA ACCESO PARA ESTUDI ANTES Y PROFESORES Public Sub buscaacceso1 pvall As String pval2 As String Dim abre As Integer Dim deco As String Dim dbt As ADODB Connection Dim rpa As ADODB Recordset rea As ADODB Recordset servopera 0 Set dbt New ADODB Connection Set rpa New ADODB Recordset Set rea New ADODB Recordset dbt ConnectionString dsn educacion dbt Open rea Open select from Estudiantes dbt adOpenStatic adLockReadOnly adCmdText rpa Open select from Profesores dbt adOpenStatic adLockReadOnly adCmdText deco DecodeStr64 pval2 Profesores With rpa Do While Not EOF If LCase pvall LCase Nombre Usuario And LCase deco LCase Password Then Lorena Guisela J aramillo Mediavilla 1 UTN FI CA El SI C Tesis de Grado Transmisi n Sateli
16. bt New ADODB Connection Set preg New ADODB Recordset dbt ConnectionString dsn educacion dbt Open npreg 0 tpreg 0 If pidexa lt gt Then preg Open SELECT from Examenes linea WHERE Id examen pidexa dbt adOpenStatic adLockReadOnly adCmdText npreg preg RecordCount 1 If npreg gt 0 Then With preg Call limpiaexamen Do While Not EOF idpregunta idpregunta Id pregunta pregunta pregunta amp pregunta amp op1 opl opl amp op2 op2 amp op2 amp 0p3 op3 amp lop3 amp op4 op4 amp op4 amp op5 op5 op5 respuesta respuesta amp respuesta amp tipopregunta tipopregunta amp tipopregunta amp valorpregunta valorpregunta amp Valor pregunta amp tiemporespuesta tiemporespuesta amp tiempo respuesta amp tpreg tpreg tiempo respuesta MoveNext Loop Lorena Guisela J aramillo Mediavilla 10 UTN FI CA El SI C Tesis de Grado Transmisi n Satelital End With End If preg Close Set preg Nothing End If dbt Close Set dbt Nothing End Sub Private Sub limpiaexamen idpregunta pregunta opl op2 0p3 op4 op5 respuesta tipopregunta valorpregunta tiemporespuesta tpreg 0 End Sub Manual T cnico SISLEA PERMITE ALMACENAR LAS RESPUESTAS A CADA UNA DE LAS PREGUNTAS Public Sub almacenarespuesta respidexam As String
17. dset Dim rexa numexa As Integer numexa 1 UTN FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA Set dbt New ADODB Connection Set rsexa New ADODB Recordset dbt ConnectionString dsn educacion dbt Open If eidpro lt gt Then rsexa Open SELECT from Examatprofniv WHERE Id profesor eidpro dbt adOpenDynamic adLockOptimistic adCmdText rexa rsexa RecordCount 1 With rsexa If Not BOF And EOF Then Do While Not EOF numexa numexa 1 slastrecord Bookmark MoveNext Loop End If AddNew lid profesor Trim eidpro lid materia Trim eidmat lid nivel 2 Trim eidniv IId examen numexa Trim pastem Trim Str rexa x numexa Idescripcion Trim edesexa desexa Trim edesexa Update End With idexamen numexa Trim pastem Trim Str rexa x rsexa Close Set rsexa Nothing End If dbt Close Set rsexa Nothing End Sub GUARDAR LAS PREGUNTAS QUE CONTI ENEN LOS EXAMENES Public Sub guardapreguntas idexam As String idpreg As String preg As String opcl As String opc2 As String opc3 As String opc4 As String opc5 As String respu As String tipopreg As String valorpreg As String tiemporesp As String Dim dbt As ADODB Connection Dim pregexa As ADODB Recordset Set dbt New ADODB Connection Set pregexa New ADODB Recordset dbt ConnectionString DSN educacion dbt Open Lorena Guisela J aramillo Mediavilla 7 UTN
18. empre en el tope SetWindowPos Me hWnd HWND_TOPMOST 0 0 0 0 SWP_NOMOVE SWP_NOSIZE Ventana principal no visible frmMain Visible False mismos tama os como desktop de los servidores Me Width Me ScaleX dx vbPixels vbTwips Me Height Me ScaleY dy vbPixels vbTwips el picturebox es m s peque o pVideo Width Me Width 100 pVideo Height Me Height 200 Call CapConnect End Sub Private Sub pVideo_KeyDown KeyCode As Integer Shift As Integer Env a el c digo de la tecla precionada y espera para responder Dim bKeys As Byte Lorena Guisela J aramillo Mediavilla 23 UTN FICA EI SIC Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA bKeys CByte KeyCode TCP KB SendData bKe ys Do Until KbReply DoEvents Loop KbReply False End Sub Private Sub pVideo_MouseUp Button As Integer Shift As Integer X As Single Y As Single env a la posici n y el bot n para un click del mouse se puede agregar funcionalidad para decir al servidor si el cambio importante es precionado Select Case Button Case 1 TCP Mouse SendData X amp amp Y amp 1 Case 2 TCP Mouse SendData X amp amp Y amp amp 3 End Select Do Until MouseReply DoEvents Loop End Sub Private Sub TCP DataArrival ByVal BytesTotal As Long Dim Ret As Long Dim ByteArray As Byte Bueno Obtengo una serie de bytes comprimidos TCP GetData ByteArray vbByte Descomprimo eso Call
19. nivel pidnivell AND Puntajes Id_estudiante pidestul AND Puntajes contestado vl ys sqlstring sqlwhat sglwhere preg Open sqlstring dbt adOpenStatic adLockReadOnly adCmdText totpunta With preg Do While Not EOF totpunta totpunta lidexaml descril Str puntajel amp Lorena Guisela J aramillo Mediavilla 13 UTN FICA EI SIC Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA MoveNext Loop End With preg Close Set preg Nothing dbt Close Set dbt Nothing End Sub ESTUDI ANTE Y PROFESOR Estos m dulos contienen varias herramientas que son iguales para los dos a continuaci n se describen algunas VOZ Declaraciones Option Explicit Public CLOSI NGAPPLI CATION As Boolean Bandera del estado de la aplicaci n Public wStream As Object Activa el reproductor del Audio Private Sub cmdTalk Click Dim rc As Long Retorna un c digo de variable Dim iPort As Integer Puerto Local Dim itm As Integer Actual Item If Not wStream Playing And wStream PlayDeviceFree And _ Not wStream Recording And wStream RecDeviceFree Then Estado de validaci n del dispositivo de audio wStream Playing True Reproduciendo el audio cmdtalk Caption 2 amp Escuchando Screen MousePointer vbHourglass iPort wStream Streaml nQueue Do While iPort lt gt NULLPORTID Mientras los puertos del socket tienen datos en el reproduc
20. oad TCPSocket I dx Conexi n fallada descargo las instancias del control End If ConnectionList Enabled True connecta Enabled True End If End Sub Form Load lo que se cargara al acceeder el formulario Private Sub Form_Load Dim rc As Long Dim Idx As Long Dim TCPidx As Long CLOSINGAPPLICATION False Call InitServerList txtServer Obtengo la lista del servidor en comun txtServer Text txtServer List 0 Despliego el primer nombre en la lista imgStatus Imglcons Listl mages phoneHungUp Picture Set wStream New WaveStream Lorena Guisela J aramillo Mediavilla 16 UTN FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA Call wStream I nitACMCodec WAVE FORMAT GSM610 TIMESLICE cmdtalk Enabled False Deshabilito el control hasta conectar Tools Buttons tbHANGUP Enabled ConnectionList Text lt gt inLight Picture Imglcons Listl mages speakNO Picture outLight Picture I mglcons Listl mages mikeNO Picture Option1 Value True Call Listen TCPSocket 0 Escuchando para la conexi n TCP IP End Sub CAPTURA DE VI DEO Public Const WS BORDER amp H800000 Public Const WS CAPTION amp HC00000 Public Const WS SYSMENU amp H80000 Public Const WS CHILD amp H40000000 Public Const WS VISIBLE amp H10000000 Public Const WS OVERLAPPED amp H0 amp Public Const WS MINIMIZEBOX amp H20000 Public Const WS MAXIMIZEBOX amp H10000 Public Const WS THICKFRAME am
21. on Dim sStatusText As String Dim usStatusText As String Lorena Guisela J aramillo Mediavilla 18 UTN FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA sStatusText String 255 0 IStrCpy StrPtr sStatusText ipstrStatusText sStatusText Left sStatusText InStr sStatusText Chr 0 1 usStatusText StrConv sStatusText vbUnicode frmVideo StatusBar SimpleText usStatusText Debug Print Status usStatusText ilD Select Case ilD End Select End Function Sub ResizeCaptureWindow ByVal lwnd As Long Dim CAPSTATUS As CAPSTATUS Dim ICaptionHeight As Long Dim IX Border As Long Dim IY Border As Long ICaptionHeight GetSystemMetrics SM CYCAPTION IX Border GetSystemMetrics SM CXFRAME IY Border GetSystemMetrics SM CYFRAME If capGetStatus Iwnd VarPtr CAPSTATUS Len CAPSTATUS Then SetWindowPos Iwnd HWND BOTTOM 0 0 _ CAPSTATUS uil mageWidth IX Border 2 _ CAPSTATUS uil mageHeight ICaptionHeight IY Border 2 SWP NOMOVE Or SWP NOZORDER End If Debug Print Resize Window End Sub Function MyVideoStreamCallback Iwnd As Long IpVHdr As Long As Long Beep End Function Function MyWaveStreamCallback Iwnd As Long IpVHdr As Long As Long Debug Print WaveStream End Function Sub LogError txtError As String IID As Long frmVideo StatusBar SimpleText txtError Debug Print Error txtError IID End Sub Lorena Guisela J aramillo Mediavilla 19 U
22. p dbt adOpenStatic adLockReadOnly adCmdText Materias rsmateria Open SELECT Descripcion From Materias WHERE ld Materia rbmp id materia dbt adOpenStatic adLockReadOnly adCmdText Materias rsidniv Open SELECT Id Nivel From Niveles WHERE Id Nivel 2 amp rbmplid nivel amp dbt adOpenStatic adLockReadOnly adCmdText Niveles rsniveles Open SELECT Descripcion From Niveles WHERE Id Nivel rbmp id nivel amp dbt adOpenStatic adLockReadOnly adCmdText Niveles desidmate desidmate rsidmate 0 amp desmate desmate rsmateria 0 amp desidniv desidniv amp rsidniv 0 amp desniv desniv amp rsniveles 0 amp rsidmate Close rsmateria Close rsidniv Close rsniveles Close MoveNext Loop End With rsinsc Close Set rdinsc Nothing rsmatinsc Close Set rsmatinsc Nothing rbmp Close Set romp Nothing End If dbt Close Set dbt Nothing End Sub ACCESO A LA BASE DE DATOS PARA EXTRAER LI STADOS DE NOTAS DE LOS ESTUDI ANTES Public Sub listadonotas lidmat As String lidnivel As String lidpo As String Dim dbt As ADODB Connection Dim rslistado As ADODB Recordset Dim rslistestu As ADODB Recordset Dim rslistnot As ADODB Recordset Dim rsnomestu As ADODB Recordset Lorena Guisela J aramillo Mediavilla UTN FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA Dim nomauxes As String Set dbt New ADODB
23. p H40000 Public Const WS OVERLAPPEDWINDOW WS OVERLAPPED Or WS CAPTION Or WS SYSMENU Or WS THICKFRAME Or WS MINIMIZEBOX Or WS MAXI MIZEBOX Public Const SWP_NOMOVE amp H2 Public Const SWP_NOSIZE 1 Public Const SWP_NOZORDER amp H4 Public Const HWND_BOTTOM 1 Public Const HWND_TOPMOST 1 Public Const HWND_NOTOPMOST 2 Public Const SM_CYCAPTION 4 Public Const SM_CXFRAME 32 Public Const SM_CYFRAME 33 Public Const WS_EX_TRANSPARENT amp H20 amp Public Const GWL_STYLE 16 Declare Function SetWindowLong Lib user32 Alias SetWindowLongA ByVal hWnd As Long ByVal nIndex As Long ByVal dwNewLong As Long As Long Manipulaci n de Memoria Declare Function IStrCpy Lib kernel32 Alias IstrcpyA ByVal IpString1 As Long ByVal IpString2 As Long As Long Declare Function IStrCpyn Lib kernel32 Alias IstrcpynA ByVal IpStringl As Any ByVal IpString2 As Long ByVal iMaxLength As Long As Long Declare Sub RtIMoveMemory Lib kernel32 ByVal hpvDest As Long ByVal hpvSource As Long ByVal cbCopy As Long Declare Sub hmemcpy Lib kernel32 hpvDest As Any hpvSource As Any ByVal cbCopy As Long Lorena Guisela J aramillo Mediavilla 17 UTN FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA Manipulaci n de ventanas Declare Function SetWindowPos Lib user32 ByVal hWnd As Long ByVal hWndlnsertAfter As Long ByVal X As Long ByVal Y As Long ByVal cx As Long
24. r la Ventana mientras est Grabando End Sub Private Sub mnuFileExit Click DoEvents Unload Me End Sub Private Sub mnuFileNew Click FreshForm End Sub Private Sub mnuFileOpen Click ComDlg ShowOpen Abre el cuadro de dialogo para recuperar el archivo grabado FN ComDlg FileName Obtiene el nombre del archivo escojido If FN Then Exit Sub Verifica si ha seleccionado el archivo LoadFile FN Ahora lee el archivo End Sub Lorena Guisela J aramillo Mediavilla 20 UTN FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA Private Sub mnuFileSave Click If FN Then mnuFileSaveAs Click Exit Sub SaveFile FN End Sub Private Sub mnuFileSaveAs Click ComDlg DialogTitle GUARDAR ARCHIVO ComDlg ShowSave Abre el cuadro de di logo para guardar el archivo FN ComDlg FileName Obtiene el nombre del archivo escojido If FN Then Exit Sub Verifica si ha seleccionado el archivo SaveFile FN Ahora lee el archivo End Sub Private Sub tmrRecord Timer Record End Sub Private Sub tmrPlay Timer Play End Sub Estas funciones son llamadas en las l neas de c digo anteriores Public Sub Record GetCursorPos Cursor i pos Grabamos posici n del cursor Esc CBool GetAsyncKeyState vbKeyEscape Monitoreamos la tecla ESC en caso de que el Usuario quiere parar Cursor i LButton CBool GetAsyncKeyState vbLeftButton Estado del Bot n inquierdo Cursor i MButton CBool GetAsyncKeyState vb
25. tal Manual T cnico SI SLEA acepto True idprofesor id profesor idestudiante apr 1 Exit Do Else acepto False End If MoveNext Loop End With Estudiantes If acepto False Then With rea Do While Not EOF If LCase pvall LCase Nombre Usuario And LCase deco LCase Password Then acepto True idestudiante id estudiante idprofesor apr 2 Exit Do Else acepto False End If MoveNext Loop End With End If rpa Close Set rpa Nothing rea Close Set rea Nothing dbt Close Set dbt Nothing End Sub BUSCA ACCESO DI FERENTES MATERI AS O CURSOS PARA PROFESORES Public Sub buscomateprof idprofe As String Dim dbt As ADODB Connection Dim rbmp As ADODB Recordset Dim rsmateria As ADODB Recordset Dim rsidmate As ADODB Recordset Dim rsidniv As ADODB Recordset Dim rsniveles As ADODB Recordset Set dbt New ADODB Connection Lorena Guisela J aramillo Mediavilla 2 UTN FI CA El SI C Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA Set rbmp New ADODB Recordset Set rsmateria New ADODB Recordset Set rsidmate New ADODB Recordset Set rsidniv New ADODB Recordset Set rsniveles New ADODB Recordset dbt ConnectionString dsn educacion dbt Open If idprofe lt gt Then rbmp Open select from ProfMateNiv where ld profesor 2 idprofe dbt adOpenStatic adLockReadOnly adCmdText With rbmp Do While Not EOF rsidmate Open select Id Materia
26. tor de audio inLight Picture Imglcons Listl mages speakON Picture inLight Refresh For itm 0 To ConnectionList ListCount 1 Busco el usuario actual para ejecutar los datos de sonido If ConnectionList ltemData itm iPort Then si lo encuentro ConnectionList Topl ndex itm obtengo el dice del mismo ConnectionList Selected itm True Selecciono al miembro para presentar quien est hablando actualmente Exit For Lorena Guisela J aramillo Mediavilla 14 UTN FICA EI SIC Tesis de Grado Transmisi n Satelital Manual T cnico SI SLEA End If Next rc 2 wStream PlayWave Me hWnd iPort ejecuto los datos wave que est n en el puerto Call wStream RemoveStreamFromQueue iPort Remuevo el ID del Puerto desde la cola de espera playwave Port wStream Streaml nQueue inLight Picture I mgl cons Listl mages speakOFF Picture inLight Refresh Loop busco el siguiente socket que est en al cola de espera playwave ConnectionList Topl ndex 0 If ConnectionList ListCount 0 Then ConnectionList Selected 0 True Deselecciono al item posterior ConnectionList Selected 0 False deselecciono al item actualmente seleccionado End If Screen MousePointer vbDefault cmdtalk Caption amp Hablar wStream Playing False Apago la ejecuci n del reproductor de audio End If End Sub Activa la grabaci n del audio Private Sub cmdTalk MouseDown Button As Integer Shift As Integer X As Single Y As Single Dim
Download Pdf Manuals
Related Search
Related Contents
Samsung NP-R710 用户手册(Vista) PRODimmer INSTRUCTION MANUAL FMH Patient Instructions - Denver Endocrinology, Diabetes Projectors 2011 Manual do Utilizador do Nokia E7-00 Installationsanleitung PND Notice d`emploi et d`entretien des poêles à granulés 8,5 kW メディサームⅡ 高・低体温維持装置 MultiGene Thermal Cycler Operation Manual Monarch Specialties I8080BK Instructions / Assembly Copyright © All rights reserved.
Failed to retrieve file