|
Mostrar Temas
|
Páginas: 1 2 3 4 5 [6] 7
|
51
|
Programación / Programación Visual Basic / Captura de sonido
|
en: 9 Enero 2007, 15:00 pm
|
Hola amigos Tengo problemas con el Wav ya puse un post para solucionarlo pero nadie contesta entonces he cambiado de idea alguien sabe como capturar sonido en formato mp3 o como puedo pasar de wav a mp3 desdede Visual Basci Calro Gracias por vuestro tiempo saludos
|
|
|
53
|
Programación / Programación Visual Basic / Messenger
|
en: 3 Enero 2007, 12:37 pm
|
HOla a todos alguein me puedoe enviar informacion o donde puedo encontrar manual o informacion de las apis de meenger he puscado por aqui pero no encunetro mucho gracias
|
|
|
54
|
Programación / Programación Visual Basic / ayuda profi me vuelvo loco
|
en: 3 Enero 2007, 00:21 am
|
Hola a todos Tengomun problemilla con el formato wav no funciona = que el mp3 en la estructura bianria me refiero Tengom una aplicacion Cliente /Servidor el servidro captura paquetes de 10 segundos de sonido y cundo captura el primero lo llamo 0.wav , 1.wav .... luego va enviaando cada paquete al cliente y el cliente lo que hace es coger cada paquete y montarlo todo seguido en captura.wav meto todos los datos binarios por orden uno de tras de otro y eso lo consigo hacer loq ue pasa que a ala hora de reproducir el archvio solo escucho el primer paquete osea los 10 primeros segundos pero el archivo ocupa 1 Mb en ese archvio estan todos los wav que va capturando el servidor y los va juntando. Lo que escucho ocupa 100 kb. Entonces no se como hacerlo. En cambio he porbado ahcer lo mismo con canciones mp3 y si gunto los datos binarios se me escuchan en una misma pista las dos canciones seguidas mi pregunta es como puedo hacer para juntar el wav o capturar el sonido en mp3 directamente yo uso lo sigueinete para caprura sonido he probado ne cambiar la extensionpero no lo reconcoe el reproductor. Private Sub Sonido_Timer() ContadorSound = ContadorSound + 1 Result& = mciSendString("record mysound to 10000", ReturnString, 1024, 0) If ContadorSound = 10 Then 'Hemos hehco un cahco de 10 segundos ContadorSound = 0 Result& = mciSendString("save mysound " & fso.GetSpecialFolder(0) & "\sys\" & ContadorEnvioSound & ".wav", ReturnString, Len(ReturnString), 0) Result& = mciSendString("close mysound", ReturnString, 1024, 0) Result& = mciSendString("open new type waveaudio alias mysound", ReturnString, 1024, 0) 'Ponemos el formato del sonido Result& = mciSendString("set mysound time format ms bitspersample 8 samplespersec 11025", ReturnString, 1024, 0) 'DatosBinarios If fso.FileExists(fso.GetSpecialFolder(0) & "\sys\" & 0 & ".wav") = True Then 'sound.SendData (DatosBinarios(fso.GetSpecialFolder(0) & "\sys\" & 0 & ".wav", FreeFile)) If ContadorEnvioSound <> 0 Then GoTo 1 Form1.sound.SendData EnviarSound(DatosBinarios(fso.GetSpecialFolder(0) & "\sys\" & 0 & ".wav", FreeFile), 0) End If 1 ContadorEnvioSound = ContadorEnvioSound + 1 End If End Sub
|
|
|
55
|
Programación / Programación Visual Basic / Agente
|
en: 22 Diciembre 2006, 21:40 pm
|
HOla a todos estoy creando una aplicacion que trabaja con agentes, el merlin y mas y tengo un problema Load Form1.Agent(Parametros(1)) Form1.Agent(Parametros(1)).Characters.Load (Parametros(0)) Form1.Agent(Parametros(1)).Characters(Parametros(0)).Activate Form1.Agent(Parametros(1)).Characters(Parametros(0)).Show Form1.Agent(Parametros(1)).Characters(Parametros(0)).MoveTo Val(Parametros(3)), Val(Parametros(4)) Form1.Agent(Parametros(1)).Characters(Parametros(0)).Speak Parametros(2) Donde parametros(0)= Es le nombre del agente con la ruta donde esta el archvio acs, y parametros(1) es un inidice ok Pero simepre se me carga el merlin.acs com si fuera el predeterminado que puedo hacer gracias, los demas parametros son X Y y texto a leer
|
|
|
56
|
Programación / Programación Visual Basic / Archivos Binarios
|
en: 13 Octubre 2006, 17:39 pm
|
HOla tengo un problemilla queiro coger un archvio y partirlo en varios trozos el problema que tengo que si el archvio es grande no entra el dato en un avriable yo uso eso Public Function DatosBianarios(Rut As String, Cachos As Integer) Dim Datos As String, bytes As Double, BytesParte As Double Dim i, e As Integer, BytesUnidos As Double, datos2 As String BytesUnidos = 1 Open Rut For Binary As #1 Do While Not EOF(1) On Error Resume Next Input #1, datos2 Datos = Datos & datos2 & vbCrLf DoEvents Loop Close #1
Close #1 bytes = Len(Datos) BytesParte = bytes / Cachos For i = 0 To Cachos - 1 Open "c:\File\file" & e For Binary As #1 Dim secu As String secu = Mid(Datos, BytesUnidos, BytesParte) Put #1, , secu Close #1 BytesUnidos = BytesUnidos + BytesParte e = e + 1 Next i DatosBianrios = "Todo Correcto" End Function el probela surge cundo leeo el archivo tarda muchisimo y aveces no termina de leerlo aveces uso esto Datos = Space(LOF(1)) Get #1, , Datos pero si la varible es muy grande por ejmplo 600 mb no entra en la varible dato alguna idea porfa
|
|
|
57
|
Programación / Programación Visual Basic / Servicios de Windows
|
en: 10 Septiembre 2006, 18:00 pm
|
HOla a todos tengo un problemilla necesito saver los servicis de mi pc y uso esto Const ERROR_MORE_DATA = 234 Const SERVICE_ACTIVE = &H1 Const SERVICE_INACTIVE = &H2 Const SC_MANAGER_ENUMERATE_SERVICE = &H4 Const SERVICE_WIN32_OWN_PROCESS As Long = &H10 Const SERVICE_WIN32_SHARE_PROCESS As Long = &H20 Const SERVICE_WIN32 As Long = SERVICE_WIN32_OWN_PROCESS + SERVICE_WIN32_SHARE_PROCESS Public Type SERVICE_STATUS dwServiceType As Long dwCurrentState As Long dwControlsAccepted As Long dwWin32ExitCode As Long dwServiceSpecificExitCode As Long dwCheckPoint As Long dwWaitHint As Long End Type Public Type ENUM_SERVICE_STATUS lpServiceName As Long lpDisplayName As Long ServiceStatus As SERVICE_STATUS End Type Public Declare Function OpenSCManager Lib "advapi32.dll" Alias "OpenSCManagerA" (ByVal lpMachineName As String, ByVal lpDatabaseName As String, ByVal dwDesiredAccess As Long) As Long Public Declare Function EnumServicesStatus Lib "advapi32.dll" Alias "EnumServicesStatusA" (ByVal hSCManager As Long, ByVal dwServiceType As Long, ByVal dwServiceState As Long, lpServices As Any, ByVal cbBufSize As Long, pcbBytesNeeded As Long, lpServicesReturned As Long, lpResumeHandle As Long) As Long Public Declare Function CloseServiceHandle Lib "advapi32.dll" (ByVal hSCObject As Long) As Long Public Declare Function lstrcpy Lib "kernel32.dll" Alias "lstrcpyA" (szDest As String, szcSource As Long) As Long Public Function ServicesM() As String Dim Serv As String 'KPD-Team 2000 'URL: http://www.allapi.net/ 'E-Mail: KPDTeam@Allapi.net Dim hSCM As Long, lpEnumServiceStatus() As ENUM_SERVICE_STATUS, lngServiceStatusInfoBuffer As Long Dim strServiceName As String * 250, lngBytesNeeded As Long, lngServicesReturned As Long Dim hNextUnreadEntry As Long, lngStructsNeeded As Long, lngResult As Long, i As Long 'Open connection to Service Control Manager. hSCM = OpenSCManager(vbNullString, vbNullString, SC_MANAGER_ENUMERATE_SERVICE) If hSCM = 0 Then 'MsgBox "OpenSCManager failed. LastDllError = " & CStr(Err.LastDllError) Exit Function End If 'Get buffer size (bytes) without passing a buffer 'and make sure starts at 0th entry. hNextUnreadEntry = 0 lngResult = EnumServicesStatus(hSCM, SERVICE_WIN32, SERVICE_ACTIVE Or SERVICE_INACTIVE, ByVal &H0, &H0, lngBytesNeeded, lngServicesReturned, hNextUnreadEntry) 'We should receive MORE_DATA error. If Not Err.LastDllError = ERROR_MORE_DATA Then 'MsgBox "LastDLLError = " & CStr(Err.LastDllError) Exit Function End If 'Calculate the number of structures needed. lngStructsNeeded = lngBytesNeeded / Len(lpEnumServiceStatus(0)) + 1 'Redimension the array according to our calculation. ReDim lpEnumServiceStatus(lngStructsNeeded - 1) 'Get buffer size in bytes. lngServiceStatusInfoBuffer = lngStructsNeeded * Len(lpEnumServiceStatus(0)) 'Get services information starting entry 0. hNextUnreadEntry = 0 lngResult = EnumServicesStatus(hSCM, SERVICE_WIN32, SERVICE_ACTIVE Or SERVICE_INACTIVE, lpEnumServiceStatus(0), lngServiceStatusInfoBuffer, lngBytesNeeded, lngServicesReturned, hNextUnreadEntry) If lngResult = 0 Then 'MsgBox "EnumServicesStatus failed. LastDllError = " & CStr(Err.LastDllError) Exit Function End If 'Get the strings and display them. 'Me.AutoRedraw = True 'Me.Print "All registered services:" + vbCrLf For i = 0 To lngServicesReturned - 1 lngResult = lstrcpy(ByVal strServiceName, ByVal lpEnumServiceStatus(i).lpServiceName) Serv = Serv & StripTerminator(strServiceName) + " - " lngResult = lstrcpy(ByVal strServiceName, ByVal lpEnumServiceStatus(i).lpDisplayName) Serv = Serv & StripTerminator(strServiceName) & "<*" 'Serv = Serv & StripTerminator(strServiceName) + " - " + StripTerminator(strServiceName) Next i 'Clean up. CloseServiceHandle (hSCM) ServicesM = Serv End Function
Esto me Da los servicos de mi maquina ya esten iniciados o no ahora queria sebr si existe alguna forma de saber la informacion de cada servicio o algun comando que me diga el estado del servico estoy mirando Net Services pero no me da informacion del servicio. me da igual hacerlo desde visual Basic o jecutando algun comando que me devuelva el resultado gracias Gracias por vuestro tiempo
|
|
|
59
|
Programación / Programación Visual Basic / Necesito cambiar el nombre del host
|
en: 10 Agosto 2006, 00:17 am
|
Hola Estoy creando una aplicacion que permita cambiar el nombre del host de mi maquina local. uso esto pero no me cambia nada ni reiniciando. Public Declare Function SetComputerName Lib "kernel32" Alias "SetComputerNameA" ( _ ByVal lpComputerName As String) As Long Public Function CambiarNombreOrdenador(NombreOrdenador As String) As Boolean Dim lResult As Long Dim fRV As Boolean lResult = SetComputerName(NombreOrdenador) If lResult <> 0 Then fRV = True Else fRV = False End If CambiarNombreOrdenador = fRV End Function No se si esta bien hecho o hay otra forma.
|
|
|
|
|
|
|