dale en "búscar", ya se ha tratato ese tema un monton de veces
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
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
Cita de: shadow.darknesses en 4 Enero 2007, 02:14 AM
mmm, no entiendo lo que api, me pueden ayudar xfavor
gracias
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
browse_info.ulFlags = BIF_USENEWUI Or BIF_RETURNONLYFSDIRS
'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&
private sub form_Rezise()
command1.top = me.scaleheight - command1.height -100
command1.left = me.scaleWidth - command1.Width -100
end sub
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