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

 

 


Tema destacado: Curso de javascript por TickTack


  Mostrar Mensajes
Páginas: 1 ... 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 [57] 58 59 60 61 62 63 64 65
561  Programación / Programación Visual Basic / Re: Otra duda con registros... en: 2 Junio 2009, 21:40 pm
bueno, un ejemplo facil :
primero, crea un archivo.ini en el mismo directorio donde esta o va a estar tu exe, llamado config.ini:

Código
  1. [configuracion]
  2. SWidth=5000
  3. SHeight=7800
  4. SLeft=0
  5. STop=1500
  6. sCap=Hola Mundo

bueno ahora la parte de vb6.
1º agrega el modulo bas que esta en ese ejemplo del link que te pase.

en el Form1 pone un TextBox "text1"y agrega este codigo:

Código
  1. Dim INIFile As String
  2. Private Sub Form_Load()
  3. 'se le pasa la ruta del archivo ini para que lo lea
  4. INIFile = App.Path & "\config.ini"
  5.  
  6. Me.Left = GetKeyVal(INIFile, "configuracion", "SLeft")
  7. Me.Top = GetKeyVal(INIFile, "configuracion", "STop")
  8. Me.Width = GetKeyVal(INIFile, "configuracion", "SWidth")
  9. Me.Height = GetKeyVal(INIFile, "configuracion", "SHeight")
  10. Me.Caption = GetKeyVal(INIFile, "configuracion", "SCap")
  11. End Sub
  12.  
  13. Private Sub Form_Unload(Cancel As Integer)
  14. 'se guarda los valores
  15. Call AddToINI(INIFile, "configuracion", "SLeft", Me.Left)
  16. Call AddToINI(INIFile, "configuracion", "STop", Me.Top)
  17. Call AddToINI(INIFile, "configuracion", "SWidth", Me.Width)
  18. Call AddToINI(INIFile, "configuracion", "SHeight", Me.Height)
  19. Call AddToINI(INIFile, "configuracion", "SCap", Text1.Text)
  20. End Sub
  21.  

562  Programación / Programación Visual Basic / Re: Otra duda con registros... en: 2 Junio 2009, 20:44 pm
un archivo de configuración.ini seria lo mejor
INI Expert
563  Programación / Programación Visual Basic / Re: Ayuda en Creacion de mi primer virus!!! en: 30 Mayo 2009, 02:42 am
aparte de lo ironico que suene hacer un virus con fines educativos, si no se tiene el Net Framework tu virus no funcionaria?
yo buscaria otro lenguaje, con menos requerimientos...
564  Programación / Programación Visual Basic / Re: Ayuda con TextBox [Como poner un texto] en: 28 Mayo 2009, 21:01 pm
para lo del reproductor Módulo de clase para reproducir videos es el ultimo ejemplo, es una clase, asi no tenes que usar referencias.
565  Programación / Programación Visual Basic / Re: como poner icono a un ListView1 en: 25 Mayo 2009, 15:56 pm
Tutorial del Control ListView
566  Programación / Programación Visual Basic / Re: Como hacer referencia a un boton de un programa X?? en: 24 Mayo 2009, 23:55 pm
proba con BM_CLICK
567  Programación / Programación Visual Basic / Re: ayuda con textbox en: 23 Mayo 2009, 23:42 pm
Código
  1. Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Any) As Long
  2. Private Const EM_GETLINE As Long = &HC4
  3. Private Const EM_LINELENGTH As Long = &HC1
  4.  
  5. Function GetLineText(TextBox As TextBox, Optional LineNumer As Long = 1) As String
  6. Dim lc As Long, Ret As Long, Str As String
  7. lc = SendMessage(TextBox.hwnd, EM_GETLINECOUNT, 0&, 0&)
  8.    Ret = SendMessage(TextBox.hwnd, EM_LINELENGTH, (LineNumer - 1), 0&)
  9.    Str = Space(Ret)
  10.  
  11.    SendMessage TextBox.hwnd, EM_GETLINE, (LineNumer - 1), Str
  12.    GetLineText = Str
  13. End Function
  14.  
  15. Private Sub Command1_Click()
  16. MsgBox GetLineText(Text1, 3)
  17. End Sub
568  Media / Diseño Gráfico / Re: ayuda intro flash algun tutorial que me sirva ??????? xd en: 23 Mayo 2009, 15:07 pm
en si son lieas normales dentro de un MovieClip y con su propia linea de tiempo y despues se le aplica al MovieClip contenedor de todas esas lineas filtros de Iluminación y desenfoque
569  Programación / Programación Visual Basic / Re: personalizar error en: 18 Mayo 2009, 11:22 am
como vi que puso:
Citar
Error: revise el código
pense que queria saber donde le daba error en el code....
570  Programación / Programación Visual Basic / Re: personalizar error en: 16 Mayo 2009, 13:19 pm
algo asi decis vos?

Código
  1. Private Sub Form_Load()
  2.      Dim i As Integer, Str As String
  3.  
  4.     On Error GoTo ERROR
  5.  
  6. 1    For i = 0 To 257
  7. 2    Str = Chr(i)
  8. 3    Next
  9. 4    Exit Sub
  10. ERROR:
  11.    MsgBox Err.Description & ", en la linea " & Erl, , "Error " & Err.Number
  12. End Sub
Páginas: 1 ... 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 [57] 58 59 60 61 62 63 64 65
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines