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

 

 


Tema destacado: Sigue las noticias más importantes de seguridad informática en el Twitter! de elhacker.NET


  Mostrar Mensajes
Páginas: 1 ... 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 [20] 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 ... 53
191  Programación / Programación Visual Basic / Re: Rellenar listbox con archivo de texto en: 5 Enero 2007, 14:01 pm
dale en "búscar", ya se ha tratato ese tema un monton de veces
192  Programación / Programación Visual Basic / Re: Ayuda antivirus en: 4 Enero 2007, 17:26 pm
que virus es el que quieres eliminar??  :huh:
193  Programación / Programación Visual Basic / Re: no entiendo esto de listado de matar procesos en: 4 Enero 2007, 15:21 pm
mira esta API es para obtener el nombre corto de los archivos, por ejemplo: si tienes:

c:\documents and settings\usuario\una aplicación.exe

de devolvera:

c:\docume~1\usuario\unaapl~1.exe


Código:
Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal lBuffer As Long) As Long
Public Function GetShortPath(strFileName As String) As String
    Dim lngRes As Long, strPath As String
    'Crea el buffer
    strPath = String$(165, 0)
    'Obtiene el path
    lngRes = GetShortPathName(strFileName, strPath, 164)
    'le quita los carateres no validos chr$(0)'s
    GetShortPath = Left$(strPath, lngRes)
End Function

Private Sub Form_Load()
    MsgBox GetShortPath("c:\Archivos de programa\")
End Sub


esto es muy útil sobre todo para otras apis que requieren que se les de el nombre corto de algún acrchivo o carpeta
194  Programación / Programación Visual Basic / Re: no entiendo esto de listado de matar procesos en: 4 Enero 2007, 14:31 pm
mmm, no entiendo lo que api, me pueden ayudar xfavor
gracias

de manera rápida y muy por encima te dire que una API es una función, esta viene incluida en el sistema oprativo que tengas, estas API's para que entiendas mejor son como las funciones y procedimientos que haces en tus programas, solo que estas pertenecen al windows y las puedes usar desde cualquier lenguaje de programación
195  Programación / Programación Visual Basic / Re: Como ordenar un MSFlexgrid en: 4 Enero 2007, 14:16 pm
Ejemplo de las propiedades Sort, TextMatrix (Control MSHFlexGrid)

El ejemplo siguiente utiliza las propiedades Sort y TextMatrix. Realiza una ordenación del control MSHFlexGrid según el valor de un control ComboBox. Para usar el ejemplo, coloque un control MSHFlexGrid y un control ComboBox en un formulario. Pegue el código siguiente en la sección Declaraciones y, a continuación, presione F5.

Nota   Si utiliza el control MSFlexGrid, sustituya "MSHFlexGrid1" por "MSFlexGrid1".

Código:
Private Sub Combo1_Click()
' Selecciona una columna según el método Sort.
Select Case Combo1.ListIndex
Case 0 To 2
MSHFlexGrid1.Col =1
Case 3 To 4
MSHFlexGrid1.Col =2
Case 4 To 8
MSHFlexGrid1.Col =1   
End Select
' Ordena según la propiedad Combo1.ListIndex.
MSHFlexGrid1.Sort =Combo1.ListIndex
End Sub
Private Sub Form_Load()
Dim i As Integer
' Llena el control MSFlexGrid con datos aleatorios.
MSHFlexGrid1.Cols =3 ' Crea tres columnas.
   
For i =1 To 11 ' Agrega diez elementos.
MSHFlexGrid1.AddItem ""
MSHFlexGrid1.Col =2
MSHFlexGrid1.TextMatrix(i, 1) =CualquierNombre(i)
MSHFlexGrid1.TextMatrix(i, 2) =Rnd()
Next i
' Llena el cuadro combinado con las opciones de orden.
With Combo1
.AddItem "flexSortNone" ' 0
.AddItem "flexSortGenericAscending" '1
.AddItem "flexSortGenericDescending" '2
.AddItem "flexSortNumericAscending" '3
.AddItem "flexSortNumericDescending" '4
.AddItem "flexSortStringNoCaseAsending" '5
.AddItem "flexSortNoCaseDescending" '6
.AddItem "flexSortStringAscending" '7
.AddItem "flexSortStringDescending" '8
.ListIndex =0
End With
End Sub
Private Function CualquierNombre(i As Integer) As String
Select Case i
Case 1
SomeName ="Ana"
Case 2
SomeName ="Carlos"
Case 3
SomeName ="Sofía"
Case 4
SomeName ="Antonio"
Case 5
SomeName ="Elena"
Case 6
SomeName ="Laura Díaz"
Case 7
SomeName ="María Del Valle"
Case 8
SomeName ="Pablo"
Case 9
SomeName ="Julia"
Case 10
SomeName ="Manuel"
Case 11
SomeName ="Ricardo"
End Select
End Function



Esto lo saque de la ayuda de VB, espero te sirva de algo
196  Programación / Programación Visual Basic / Re: Como ordenar un MSFlexgrid en: 4 Enero 2007, 00:27 am
en un MSFlexgrid no se, pero porque mejor no usas un ListView, con la propiedad Sorted, ordenas cualquier columna

197  Programación / Programación Visual Basic / Re: Crear carpeta usando SHBrowseForFolder en: 3 Enero 2007, 18:55 pm
creo que te faltaría declarar la constante BIF_RETURNONLYFSDIRS y te sobra la linea "browse_info.ulFlags = 1 ' devuelve el nombre del directorio."
198  Programación / Programación Visual Basic / Re: Crear carpeta usando SHBrowseForFolder en: 3 Enero 2007, 14:42 pm
lo haces con la propiedad ulFlags

Código:
browse_info.ulFlags = BIF_USENEWUI Or BIF_RETURNONLYFSDIRS

también te dejo otras opciones que puesdes aplicar...
Código:
'For finding a folder to start document searching
Private Const BIF_RETURNONLYFSDIRS As Long = &H1

'For starting the Find Computer
Private Const BIF_DONTGOBELOWDOMAIN As Long = &H2

'Top of the dialog has 2 lines of text for
'BROWSEINFO.lpszTitle and one line if this flag is set.
'Passing the message BFFM_SETSTATUSTEXTA to the hwnd
'can set the rest of the text.  This is not used with
'BIF_USENEWUI and BROWSEINFO.lpszTitle gets all three
'lines of text.
Private Const BIF_STATUSTEXT As Long = &H4

Private Const BIF_RETURNFSANCESTORS As Long = &H8

'Add an editbox to the dialog: SHELL 5.0 or later only!
Private Const BIF_EDITBOX As Long = &H10

'insist on valid result (or CANCEL)
Private Const BIF_VALIDATE As Long = &H20

'Use the new dialog layout with the ability
'to resize: SHELL 5.0 or later only!
Private Const BIF_NEWDIALOGSTYLE As Long = &H40
Private Const BIF_USENEWUI As Long = (BIF_NEWDIALOGSTYLE Or BIF_EDITBOX)

'Allow URLs to be displayed or entered
'(Requires BIF_USENEWUI): SHELL 5.0 or later only!
Private Const BIF_BROWSEINCLUDEURLS As Long = &H80

'Add a UA hint to the dialog, in place of the
'edit box. May not be combined with BIF_EDITBOX: SHELL 6.0 or later only!
Private Const BIF_UAHINT As Long = &H100

'Do not add the "New Folder" button to the dialog.
'Only applicable with BIF_NEWDIALOGSTYLE: SHELL 5.0 or later only!
Private Const BIF_NONEWFOLDERBUTTON As Long = &H200

'Browsing for Computers
Private Const BIF_BROWSEFORCOMPUTER As Long = &H1000

'Browsing for Printers
Private Const BIF_BROWSEFORPRINTER As Long = &H2000

'Browsing for Everything
Private Const BIF_BROWSEINCLUDEFILES As Long = &H4000

'sharable resources displayed (remote shares,
'requires BIF_USENEWUI): SHELL 5.0 or later only!
Private Const BIF_SHAREABLE As Long = &H8000&
199  Programación / Programación Visual Basic / Re: ayuda VB 6: Redibujar botones del formulario al maximizar. en: 2 Enero 2007, 23:07 pm
para eso tienes que usar el evento Rezise del Form, es decir si tienes un boton que esta en la esquina inferior derecha y al maximizar quieres que sigua alli tendrías que hacer esto:


Código:

private sub form_Rezise()
    command1.top = me.scaleheight - command1.height -100
    command1.left = me.scaleWidth - command1.Width -100
end sub

con esto siempre tendras el botón en la esquina inferior derecha sin importar el tamaño del form o la resolución del monitor, si son muchos controles, puede resultar algo tedioso, pero en VB 6.0 no hay de otra. VB .NET ya trae propiedades para hacer esto de forma automatica
200  Programación / Programación Visual Basic / Re: Leer carpeta de regedit en: 31 Diciembre 2006, 01:48 am
bueno pongo una respuesta y una pregunta.


respuesta para dimitrix1:
el código quedaría así:
Código:
Private Sub Command1_Click()
    Dim f As Long, s As String
    f = FreeFile
    Open registro For Random As f
    Get #f, 10, s
    Text1.Text = s
    Close f
end sub

Pregunta para BRoWLi:
¿Cual es el path y nombre del archivo que contiene los datos del registro?  :huh:
Páginas: 1 ... 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 [20] 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 ... 53
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines