Muchas gracias... ahora lo pruebo....
 
Saludos
 
Carina

Date: Mon, 10 Mar 2008 13:03:04 -0300From: [EMAIL PROTECTED]: [EMAIL 
PROTECTED]: [vbusers] Imagen a binarioPara probar esto debes:1 - Crea un 
proyecto exe2 - Pone en un formulario una textbox3 - Setea la propiedad 
Multiline = true4 - Cambia el font a Courrier new  de 8 ( o cualquier Font no 
proporcionado )5 - La textbox debe tener un ancho de 6900 y un alto de 3000 mas 
o menos.6 - La textbox se debe llamar txtMoni.Este ejemplo convierte una string 
a hexa y muestra en lineas de 16 bytes, numera las lineas y a la derecha 
muestra el texto original.Probalo, luego modificalo para que use Byte array en 
vez de string. ( Si usas string para leer el archivo algunos caracteres serán 
convetidos )En el codigo del formulario pega esto:Dim miBuffer As StringPrivate 
Function xHexa(dChar As String) As String    Dim y As Integer    Dim d As 
Integer        For y = 1 To Len(dChar)        d = InStr(y, dChar, " ")        
If d Then Mid(dChar, d, 1) = "0"    Next    xHexa = dCharEnd FunctionPrivate 
Sub Form_Load()Monitor "kljkljlkj klj kl jkl jkljlkjklj lk"End SubPrivate Sub 
Monitor(miIng As String)                Static xPunt As Integer    Static xLin 
As Integer    Static xText As String * 16    Static xHex As String * 33      
Dim mLin As String * 58    Dim xChar As String    Dim x As Integer        'If 
chkMonit.Value <> 1 Then Exit Sub    If miIng = "INIT_" Then        xPunt = 0   
     xLin = 0        xText = ""        xHex = ""        Exit Sub    End If    
If Len(miBuffer) > 30000 Then        xPunt = 0        xLin = 0        xText = 
""        xHex = ""        miBuffer = ""    End If            For x = 1 To 
Len(miIng)        DoEvents        Select Case xPunt            Case 0           
     If xLin = 255 Then xLin = 0                xHex = Space(33)                
xChar = Mid(miIng, x, 1)                Mid(xHex, 1, 2) = 
xHexa(Format(Hex(Asc(xChar)), "@@"))                xText = IIf(Asc(xChar) > 
31, xChar, ".")                mLin = xHexa(Format(Hex(xLin), "@@")) & "| " & 
xHex & " | " & xText & vbCr & vbLf                miBuffer = miBuffer & mLin    
            xLin = xLin + 1                xPunt = xPunt + 1            Case 1 
To 7                xChar = Mid(miIng, x, 1)                Mid(xHex, 1 + 
(xPunt * 2), 2) = xHexa(Format(Hex(Asc(xChar)), "@@"))                
Mid(xText, 1 + xPunt, 1) = IIf(Asc(xChar) > 31, xChar, ".")                mLin 
= xHexa(Format(Hex(xLin), "@@")) & "| " & xHex & " | " & xText & vbCr & vbLf    
            miBuffer = Mid(miBuffer, 1, Len(miBuffer) - 58) & mLin              
  xPunt = xPunt + 1            Case 8 To 14                xChar = Mid(miIng, 
x, 1)                Mid(xHex, 2 + (xPunt * 2), 2) = 
xHexa(Format(Hex(Asc(xChar)), "@@"))                Mid(xText, 1 + xPunt, 1) = 
IIf(Asc(xChar) > 31, xChar, ".")                mLin = xHexa(Format(Hex(xLin), 
"@@")) & "| " & xHex & " | " & xText & " | " & vbCr & vbLf                
miBuffer = Mid(miBuffer, 1, Len(miBuffer) - 58) & mLin                xPunt = 
xPunt + 1            Case 15                xChar = Mid(miIng, x, 1)            
    Mid(xHex, 2 + xPunt * 2, 2) = xHexa(Format(Hex(Asc(xChar)), "@@"))          
      Mid(xText, 1 + xPunt, 1) = xChar                mLin = 
xHexa(Format(Hex(xLin), "@@")) & "| " & xHex & " | " & xText & vbCr & vbLf      
          miBuffer = Mid(miBuffer, 1, Len(miBuffer) - 58) & mLin                
xPunt = 0        End Select    Next x    txtMoni = miBuffer    End SubEspero 
puedas utilizarlo, es una ejemplo, dentro tiene todo lo que necesitas.:DDaniel 
Calvin
El día 10/03/08, Carina V. Barca <[EMAIL PROTECTED]> escribió: 

Si, esa era la idea, muchas gracias. Si me podes pasar la rutina me vendria 
barbaro.Gracias de nuevo por responder


Date: Mon, 10 Mar 2008 12:11:09 -0300 
From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: [vbusers] Imagen a binarioQueres 
ver la representación binaria del contenido?, algo asi como:2E 33 FE ......  
Esa estu idea?Te puedo mandar una rutina que convierte un array de bytes a su 
representación hexadecimal.Daniel Calvin
2008/3/10, Carina V. Barca <[EMAIL PROTECTED]>: 

Gracias por responder. Quiero poder ver ese binario y no la imagen.Saludos


Date: Mon, 10 Mar 2008 11:27:02 -0300From: [EMAIL PROTECTED]: [EMAIL 
PROTECTED]: [vbusers] Imagen a binario 
Hola CarinaNo entiendo bien tu pregunta. Un archivo bmp ojpg es una archivo 
binario. Que necesitas hacer?, que es lo que buscas 
especificamente?SaludosDaniel Calvin
El día 10/03/08, Carina V. Barca <[EMAIL PROTECTED]> escribió: 

Buen dia: alquien tiene idea de como transformar un archivo de imagen (bmp, 
jpg.....) a un archivo binario? Muchas gracias

Sigue los principales acontecimientos deportivos en directo. MSN Motor-- Daniel 
A. CalvinCooperator Team Memberhttp://www.cooperator.com.arMicrosoft Certified 
Professional 

Sigue de cerca las últimas tendencias y lo que más rompe MSN Vídeo-- Daniel A. 
CalvinCooperator Team Memberhttp://www.cooperator.com.arMicrosoft Certified 
Professional 

Sigue al minuto las principales noticias de tu ciudad MSN Deportes-- Daniel A. 
CalvinCooperator Team Memberhttp://www.cooperator.com.arMicrosoft Certified 
Professional 
_________________________________________________________________
La vida de los famosos al desnudo en MSN Entretenimiento
http://entretenimiento.es.msn.com/

Responder a