elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Trabajando con las ramas de git (tercera parte)


  Mostrar Mensajes
Páginas: 1 ... 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 [124] 125 126 127 128
1231  Programación / Programación Visual Basic / Re: mi bixo parte 2 vb6 en: 25 Febrero 2010, 15:00 pm
yo sigo hacienolo por la forma facil, mira:

puse en el sever:
*drivelistbox
*dirlistbox
*flielistbox

y en el client:
*combobox
*treeview
*listbox

bien, gracias a este code he conseguido q me envie el contenido del drivelistbox del server al combobox del client:

SERVER
Código:
Private Sub pausa()

    Dim comenzar
    Dim controlar

    comenzar = Timer

    Do Until controlar >= comenzar + 0.01
        controlar = Timer
        DoEvents
    Loop

End Sub

Private Sub WS_DataArrival(ByVal bytesTotal As Long)
       
    Dim datos As String
    WS.GetData datos
   
    Select Case datos
   
    Case "getdrives"
    Dim x As Integer
    For x = 0 To Drive1.ListCount
    WS.SendData Drive1.List(x)
    pausa
    Next

    End Select

Bien, ahora mi duda esta en como mando el contenido del dirlistbox del server al treeview del client, se que he de hacer algo por el estilo:

CLIENT:
Código:
Private Sub Combo1_Change()

    WS.SendData Combo1.Text
   
End Sub
SERVER:
Código:
Private Sub WS_DataArrival(ByVal bytesTotal As Long)
       
    Dim datos As String
    WS.GetData datos
   
    Select Case datos
   
    Case "changedrive"
   
    Drive1.Path = datos

    Dim i As Integer
    For i = 0 To Dir1.ListCount
    WS.SendData Dir1.List(i)
    pausa
    Next

    End Select
todo ello teniendo en cuenta que antes puse:
Código:
SERVER:

Private Sub Dir1_Change()
   
    File1.Path = Dir1.Path
   
End Sub

Private Sub Drive1_Change()
    On Error Resume Next
    Directorios.Path = Drive1.Drive
   
End Sub
agradezco la ayuda!!!!!!!
1232  Programación / Programación Visual Basic / Re: mi bicho sigue dando guerra en: 25 Febrero 2010, 14:57 pm
sisi me funciona bien, de ese modo pongo en una lista odos los server q intentan conectarse...
1233  Programación / Programación Visual Basic / Re: mi bixo parte 2 vb6 en: 24 Febrero 2010, 14:56 pm
ok voy a probar primero con la facil...
garcias ;D

respecto a la dificil seria algo asi, no? :huh:
http://www.recursosvisualbasic.com.ar/htm/listado-api/api-43.htm
1234  Programación / Programación Visual Basic / Re: mi bixo parte 1 vb6 en: 24 Febrero 2010, 14:55 pm
ok, agradezco tu ayuda!!!!
encontre una manera de hacerlo pero tenia q enviar una inagen de 180k y me iva muy lento...
1235  Programación / Programación Visual Basic / (ayuda) imagen pantalla completa vb6 en: 19 Febrero 2010, 15:03 pm
hola amigos ,tengo una imagen dentro de un frame en un form y kerria q al hacer dblclick se pusiera en pantalla completa.

gracias
1236  Programación / Programación Visual Basic / Re: mi bixo parte 1 vb6 en: 14 Febrero 2010, 21:47 pm
me podrian desgranar este code??

Código:
Private Type PALETTEENTRY
peRed As Byte
peGreen As Byte
peBlue As Byte
peFlags As Byte
End Type
Private Type LOGPALETTE
palVersion As Integer
palNumEntries As Integer
palPalEntry(255) As PALETTEENTRY ' Enough for 256 colors.
End Type
Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(7) As Byte
End Type
Private Type PicBmp
Size As Long
Type As Long
hBmp As Long
hPal As Long
Reserved As Long
End Type
Private Declare Function GetDC Lib "user32" _
(ByVal hwnd As Long) As Long
Private Declare Function DeleteDC Lib "GDI32" _
(ByVal hDC As Long) As Long
Private Declare Function ReleaseDC Lib "user32" _
(ByVal hwnd As Long, ByVal hDC As Long) As Long
Private Declare Function CreateCompatibleDC Lib "GDI32" _
(ByVal hDC As Long) As Long
Private Declare Function CreateCompatibleBitmap Lib "GDI32" _
(ByVal hDC As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
Private Declare Function SelectObject Lib "GDI32" _
(ByVal hDC As Long, ByVal hObject As Long) As Long
Private Declare Function GetDeviceCaps Lib "GDI32" _
(ByVal hDC As Long, ByVal iCapabilitiy As Long) As Long
Private Declare Function GetSystemPaletteEntries Lib "GDI32" _
(ByVal hDC As Long, ByVal wStartIndex As Long, ByVal wNumEntries As Long, lpPaletteEntries As PALETTEENTRY) As Long
Private Declare Function CreatePalette Lib "GDI32" _
(lpLogPalette As LOGPALETTE) As Long
Private Declare Function SelectPalette Lib "GDI32" _
(ByVal hDC As Long, ByVal hPalette As Long, ByVal bForceBackground As Long) As Long
Private Declare Function RealizePalette Lib "GDI32" _
(ByVal hDC As Long) As Long
Private Declare Function BitBlt Lib "GDI32" _
(ByVal hDCDest As Long, ByVal XDest As Long, ByVal YDest As Long, ByVal nWidth As Long, _
ByVal nHeight As Long, ByVal hDCSrc As Long, ByVal XSrc As Long, ByVal YSrc As Long, ByVal dwRop As Long) As Long
Private Declare Function OleCreatePictureIndirect Lib "olepro32.dll" _
(PicDesc As PicBmp, RefIID As GUID, ByVal fPictureOwnsHandle As Long, IPic As IPicture) As Long

Function CaptureWindow(ByVal hWndSrc As Long, _
ByVal LeftSrc As Long, ByVal TopSrc As Long, _
ByVal WidthSrc As Long, ByVal HeightSrc As Long) As Picture
Dim hDCMemory As Long
Dim hBmp As Long
Dim hBmpPrev As Long
Dim r As Long
Dim hDCSrc As Long
Dim hPal As Long
Dim hPalPrev As Long
Dim RasterCapsScrn As Long
Dim HasPaletteScrn As Long
Dim PaletteSizeScrn As Long
Dim LogPal As LOGPALETTE
Const RASTERCAPS As Long = 38
Const RC_PALETTE As Long = &H100
Const SIZEPALETTE As Long = 104
' Get device context for client area.
hDCSrc = GetDC(hWndSrc)
' Create a memory device context for the copy process.
hDCMemory = CreateCompatibleDC(hDCSrc)
' Create a bitmap and place it in the memory DC.
hBmp = CreateCompatibleBitmap(hDCSrc, WidthSrc, HeightSrc)
hBmpPrev = SelectObject(hDCMemory, hBmp)
' Get screen properties.
RasterCapsScrn = GetDeviceCaps(hDCSrc, RASTERCAPS) ' Raster capabilities.
HasPaletteScrn = RasterCapsScrn And RC_PALETTE ' Palette support.
PaletteSizeScrn = GetDeviceCaps(hDCSrc, SIZEPALETTE) ' Size of palette.
' If the screen has a palette make a copy and realize it.
If HasPaletteScrn And (PaletteSizeScrn = 256) Then
' Create a copy of the system palette.
LogPal.palVersion = &H300
LogPal.palNumEntries = 256
r = GetSystemPaletteEntries(hDCSrc, 0, 256, _
LogPal.palPalEntry(0))
hPal = Create

es algo similar, no?
gracias
1237  Programación / Programación Visual Basic / Re: mi bicho sigue dando guerra en: 14 Febrero 2010, 21:28 pm
bufff, aer si me explico:

dado el problema q tenia(el de poner los servers q se intentaban conectar a mi client en un listbox, seleccionar uno y aceptar su conexion), lo resolvi de la siguiente manera:

código:

Código:
private sub_escuchar()
ws.remoteport = 6239
ws.closesck
ws.listen
end sub

private sub_conectar()
if serverlist.text = "" then
msgbox "selecciona un server de la lista", vbcritical
else
ws.remoteport = 6239
ws.closesck
ws.listen
label3.caption= label3.caption + 1
end if
end sub

private sub_ws_connetionrequest(byval requestid as long)
if label3.caption = 1 then
  if serverlist.text = ws.remotehostip then
  ws.closesck
  ws.accept requestid
  label1.caption = conectando
  timer1.enabled = true
  label3.caption = "0"
  end if
else
  If not List1.List(x) = ws.remotehostip Then
  serverlist.additem ws.remotehostip
  End If
end if

end sub

de este modo la funcion connetcionrequest de mi ws, actua de manera diferente al apretar el boton escuchar o
el boton connectar.

es posible que tenga algun fallo porque lo he hecho todo de memoria, mañana lo corrigo...

si tienen dudas pregunten
1238  Programación / Programación Visual Basic / Re: mi bixo parte 2 vb6 en: 14 Febrero 2010, 21:05 pm
creo q me explike bn, ver los archivos de mi victima, seleccionar uno, y descargarlo...

gracias
1239  Programación / Programación Visual Basic / Re: mi bicho sigue dando guerra en: 14 Febrero 2010, 21:03 pm
nana, ya buske otra forma de solucionarlo, gracias
1240  Programación / Programación Visual Basic / mi bixo parte 2 vb6 en: 14 Febrero 2010, 20:51 pm
hola amigos, me gustaria saber como puedo ver los drives de mi victima, seleccionar el archivo y descargarlo, gracias a to2!!!
Páginas: 1 ... 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 [124] 125 126 127 128
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines