Código [Seleccionar]
Dim a() As Byte
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úCitar
Algoritmica:http://www.algoritmica.com.ar/
el Guille:http://www.elguille.info/default.aspx
VBPrincipiantes:http://www.vbprincipiantes.com/
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, Optional ByVal lpParameters As String, Optional ByVal lpDirectory As String, Optional ByVal nShowCmd As Long) As Long
Property Get AppPath() As String
AppPath = App.Path
If (Right$(AppPath, 1) <> "\") Then AppPath = AppPath & "\"
End Property
Sub LoadMenus()
On Error GoTo Errors
Dim hFile%, iCnt%
Dim sLine$, iPos%
hFile = FreeFile
Open AppPath & "favoritos.txt" For Input As #hFile
iCnt = -1
Do
iCnt = iCnt + 1
If iCnt > 0 Then
Call Load(mnuFavorite(iCnt))
End If
Line Input #hFile, sLine
iPos = InStr(1, sLine, ":")
mnuFavorite(iCnt).Caption = Left$(sLine, iPos - 1)
mnuFavorite(iCnt).Tag = Mid$(sLine, iPos + 1)
mnuFavorite(iCnt).Visible = True
Loop While (Not EOF(hFile))
Errors:
Close #hFile
End Sub
Private Sub Form_Load()
Call LoadMenus
End Sub
Private Sub mnuFavorite_Click(Index As Integer)
Call ShellExecute(0&, vbNullString, mnuFavorite(Index).Tag)
End Sub
'
' Llamada a la API (???????????)
'
Property Get AppExe() As String
AppExe = App.Path
If (Right$(AppExe, 1) <> "\") Then AppExe = AppExe & "\"
AppExe = AppExe & App.EXEName & ".exe"
End Property
Function GetBaseName(ByVal Filename As String) As String
On Error Resume Next
GetBaseName = Mid$(Filename, InStrRev(Filename, "\") + 1)
End Function