|
Mostrar Temas
|
Páginas: 1 2 3 4 5 6 7 [8] 9
|
72
|
Programación / Programación Visual Basic / Crear y leer archivo .ini
|
en: 14 Julio 2006, 14:07 pm
|
bueno, cogi este codigo de esta web, pero hay cosas que me dan error Leer y escribir un fichero Ini:
Declaraciones generales en un módulo:
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA"_ (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As_ String ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As_ String) As Long Declare Function WritePrivateProfileString Lib "kernel32" Alias_ "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As_ Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Leer en "Ejemplo.Ini":
Private Sub Form_Load() Dim I As Integer Dim Est As String Est = String$(50, " ") I = GetPrivateProfileString("Ejemplo", "Nombre", "", Est, Len(Est), "Ejemplo.ini") If I > 0 Then MsgBox "Tu Nombre es: " & Est End If End Sub
Escribir en "Prueba.Ini":
Private Sub Form_Unload(Cancel As Integer) Dim I As Integer Dim Est As String Est = "Ejemplo - Apartado" I = WritePrivateProfileString("Ejemplo", "Nombre", Est, "Ejemplo.ini") End Sub las declaraciones del modulo me da todas por malas y luego I = GetPrivateProfileString("Ejemplo", "Nombre", "", Est, Len(Est), "Ejemplo.ini") esto tambien me da error
|
|
|
73
|
Programación / Programación Visual Basic / splash de carga
|
en: 10 Julio 2006, 22:17 pm
|
hola, aver si me podeis decir como hacer un splash o imagen de carga, es decir, cuando ejecutas el programa, te sale una ventanita que por ejemplo pone, Visual Basic 6, (como en VB en realidad) y empieza a cargar todos los componentes, pues aver como puedo hacer eso
|
|
|
75
|
Programación / Programación Visual Basic / problema al enviar carpeta por ftp
|
en: 5 Julio 2006, 18:03 pm
|
bueno, tengo este codigo, esta bien el codigo pero no me sube la carpeta Private Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" (ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, ByVal sUserName As String, ByVal sPassword As String, ByVal lService As Long, ByVal lFlags As Long, ByVal lContext As Long) As Long Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal lFlags As Long) As Long Private Declare Function FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA" (ByVal hConnect As Long, ByVal lpszLocalFile As String, ByVal lpszNewRemoteFile As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean Private Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal hInet As Long) As Integer Private Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias "FtpSetCurrentDirectoryA" (ByVal hFtpSession As Long, ByVal lpszDirectory As String) As Boolean Const INTERNET_OPEN_TYPE_PRECONFIG = 0 Const INTERNET_DEFAULT_FTP_PORT = 21 Const INTERNET_SERVICE_FTP = 1 Const PassiveConnection As Boolean = True Const INTERNET_FLAG_PASSIVE = &H8000000 Const FTP_TRANSFER_TYPE_UNKNOWN = &H0
Dim hConnection, hOpen, Num As Long Private Sub Command1_Click()
hOpen = InternetOpen("IE", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0) DoEvents hConnection = InternetConnect(hOpen, "host", INTERNET_DEFAULT_FTP_PORT, "user", "pass", INTERNET_SERVICE_FTP, IIf(PassiveConnection, INTERNET_FLAG_PASSIVE, 0), 0) DoEvents FtpSetCurrentDirectory hConnection, "\" DoEvents FtpPutFile hConnection, "C:\prueba", "prueba", FTP_TRANSFER_TYPE_UNKNOWN, 0 DoEvents InternetCloseHandle hConnection InternetCloseHandle hOpen End Sub Private Sub Form_Load()
End Sub
|
|
|
76
|
Programación / Programación Visual Basic / seleccion de ruta para instalacion...
|
en: 2 Julio 2006, 23:31 pm
|
ok, estoy haciendo un instalador personalizado, y necesito que me deje elegir la ruta donde se moveran unos archivos que ya tengo predeterminados o los borre. ok, mi codigo es el siguiente, solo me hace falta eso Private Sub Command1_Click() Set variable = CreateObject("Scripting.FileSystemObject") variable.MoveFolder ".\Speed Island files", "C:\Archivos de programa\Rockstar Games\GTA San Andreas\Speed Island files" variable.DeleteFile "C:\Archivos de programa\Rockstar Games\GTA San Andreas\models\txd\LOADSCS.txd" variable.MoveFile ".\models\txd\LOADSCS.txd", "C:\Archivos de programa\Rockstar Games\GTA San Andreas\models\txd\LOADSCS.txd" variable.DeleteFile "C:\Archivos de programa\Rockstar Games\GTA San Andreas\models\fronten2.txd" variable.MoveFile ".\models\fronten2.txd", "C:\Archivos de programa\Rockstar Games\GTA San Andreas\models\fronten2.txd" variable.DeleteFolder "C:\Archivos de programa\Rockstar Games\GTA San Andreas\data" variable.MoveFolder ".\data", "C:\Archivos de programa\Rockstar Games\GTA San Andreas\data" Form4.Show Form2.Hide End Sub
|
|
|
80
|
Foros Generales / Sugerencias y dudas sobre el Foro / el theme del foro????
|
en: 22 Junio 2006, 21:54 pm
|
hola, yo tengo un foro smf, y ya despues de un tiempo le quiero cambiar el theme, e mirado en la pagina pero muchos son malos y los buenos dan algun problema... ya que estan en ingles, no tienen botones en español, etc etc
bueno, aver si me pueden decir que theme basico (sin modificarlo ustedes) es el de el foro de elhacker.net
gracias
|
|
|
|
|
|
|