Menú

Mostrar Mensajes

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ú

Mensajes - Dessa

#121
Foro Libre / Re: España (1-0) Portugal
30 Junio 2010, 13:04 PM
Tal vez para Argentina no sea tan impotante que destaque Messi, con que se "lleve las marcas" y deje Huecos para Higuain (4 goles en 3 Partidos) y Tevez (2 goles en dos partidos y medio) es suficiente... si el mundo lo quiere lo quiere ver como en el Barça ... que vea al Barça entonces ...

PD: si sumado a esto Messi destaca como en el partido con Nigeria o los ultimos minutos del partido con Corea... mucho mejor


#122
Programación Visual Basic / Re: Ayuda hWnd
22 Junio 2010, 12:13 PM


Option Explicit

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long

'Private Const WM_KEYDOWN As Long = &H100

Dim h As Long

Private Sub Command1_Click()
    Shell ("notepad"), vbNormalFocus
    h = FindWindow("notepad", vbNullString)
    h = FindWindowEx(h, 0, "Edit", vbNullString)

  Timer1.Interval = 100
End Sub


Private Sub Timer1_Timer()
 Call SendMessage(h, &H102, vbKeyA, 0&)
End Sub







EDIT:

Private Sub Timer1_Timer()
  If h <> 0 Then Call SendMessage(h, &H102, vbKeyA, 0&)
End Sub








#123
No se puede votar negativo ???

+1 para Seba123neo

-1 para Randomize


#125
@ juan260988 , bueno, mientras tanto busca tambien ejemplos con SendMessage, tambien te puede servir,  aqui hay uno

http://foro.elhacker.net/programacion_visual_basic/problema_con_sendmessage_ayuda-t296261.0.html



@ Fitoschido ... "nada"



#126
Cita de: juan260988 en 16 Junio 2010, 02:08 AM

aver si me lo mandan ya hecho si no es mucha molestia.


Faltaba más, pero si no es ninguna moléstia "su majestad", para cuando lo desea ???


#127
Una pregunta, si fuera con Hook, estaria bien asi ? ... cual serian las ventajas y las desventajas ?, Gracias por anticipado.

FORM



Option Explicit

Private Sub Form_Load()
   Me.AutoRedraw = True
   StartHook Me.hwnd
End Sub

Private Sub Form_Unload(Cancel As Integer)
   StopHook Me.hwnd
End Sub




MODULO



Option Explicit

Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

Private Const GWL_WNDPROC = -4
Private Const WM_MOUSEWHEEL As Long = &H20A

Dim hHook As Long

Public Sub StartHook(hwnd As Long)
   hHook = SetWindowLong(hwnd, GWL_WNDPROC, AddressOf WindowProc)
End Sub

Public Sub StopHook(hwnd As Long)
   SetWindowLong hwnd, GWL_WNDPROC, hHook
End Sub

Private Function WindowProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
 WindowProc = CallWindowProc(hHook, hwnd, uMsg, wParam, lParam)
 If uMsg = WM_MOUSEWHEEL Then
   If wParam > 0 Then
     Form1.Print "ARRIBA"
   Else
     Form1.Print "ABAJO"
   End If
 End If
End Function




#128



Sub BuscarPorFecha(sFecha As String)

Dim TeEquisTes As String
TeEquisTes = Dir(App.Path & "\Cuentas\")


Do While TeEquisTes <> ""
If InStr(1, LCase$(TeEquisTes), ".txt") > 0 Then
  If GetVar(App.Path & "\Cuentas\" & TeEquisTes, "Proximas Visitas", "Proximo Pago") = sFecha Then
      '''''   "Lo  que quieras"
  ElseIf GetVar(App.Path & "\Cuentas\" & TeEquisTes, "Proximas Visitas", "Proxima Visita") = sFecha Then
       ''''''  "Lo  que quieras"
  End If
End If
TeEquisTes = Dir
Loop


End Sub






PD: creo que con los datos que te dí lo puedes hacer.




#129
Creá un proyecto nuevo, con Text1, Text2, Text3, Command1 (los archivos de textp se van a crear en el Load) e ingresa en Text1 un numero de cliente (1, 2 o 3 para que te de los datos) (4 o mas para que te de error) 



Option Explicit
Private 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

Private Sub Command1_Click()

  Call BuscarClienteNumero(Text1)

End Sub

Sub Form_Load()

If Dir(App.Path & "\Cuentas\", vbDirectory) = "" Then MkDir App.Path & "\Cuentas\"

If Dir(App.Path & "\Cuentas\1.txt") = "" Then
  Open (App.Path & "\Cuentas\1.txt") For Output As #1
    Print #1, "[Numero de Cliente]": Print #1, "Cliente = 1": Print #1, "[Nombre Y Apellido]": Print #1, "Nombre = Eduardo"
  Close #1
End If
If Dir(App.Path & "\Cuentas\2.txt") = "" Then
  Open (App.Path & "\Cuentas\2.txt") For Output As #1
    Print #1, "[Numero de Cliente]": Print #1, "Cliente = 2": Print #1, "[Nombre Y Apellido]": Print #1, "Nombre = Guille"
  Close #1
End If
If Dir(App.Path & "\Cuentas\3.txt") = "" Then
  Open (App.Path & "\Cuentas\3.txt") For Output As #1
    Print #1, "[Numero de Cliente]": Print #1, "Cliente = 3": Print #1, "[Nombre Y Apellido]": Print #1, "Nombre = Paco"
  Close #1
End If

Text1 = "Ingresá nCliente"
Text2 = ""
Text3 = ""

Command1.Caption = "Buscar"

End Sub
Function GetVar(ByVal file As String, ByVal Main As String, ByVal Var As String, Optional EmptySpaces As Long = 1024) As String
    Dim sSpaces As String, szReturn As String
    szReturn = ""
    sSpaces = Space$(EmptySpaces)
    GetPrivateProfileString Main, Var, szReturn, sSpaces, EmptySpaces, file
    GetVar = RTrim$(sSpaces)
    GetVar = Left$(GetVar, Len(GetVar) - 1)
End Function

Sub BuscarClienteNumero(nCliente As Variant)

Text2.Text = ""
Text3.Text = ""

Dim TeEquisTes As String
TeEquisTes = Dir(App.Path & "\Cuentas\")


Do While TeEquisTes <> ""
  If InStr(1, LCase$(TeEquisTes), ".txt") > 0 Then
    If GetVar(App.Path & "\Cuentas\" & TeEquisTes, "Numero de Cliente", "Cliente") = nCliente Then
       Text2.Text = GetVar(App.Path & "\Cuentas\" & TeEquisTes, "Numero de Cliente", "Cliente")
       Text3.Text = GetVar(App.Path & "\Cuentas\" & TeEquisTes, "Nombre Y Apellido", "Nombre")
       Exit Do
    End If
  End If
  TeEquisTes = Dir
Loop

If Text2.Text = "" Then Text2.Text = "Sin Datos"
If Text3.Text = "" Then Text3.Text = "Sin Datos"

End Sub







#130
Haber si sirve;



Sub BuscarClienteNumero(nCliente As Variant)

txtCuenta.Text = ""
txtNombre.Text = ""

Dim TeEquisTes As String
TeEquisTes = Dir(App.Path & "\Cuentas\")


Do While TeEquisTes <> ""
  If InStr(1, LCase$(TeEquisTes), ".txt") > 0 Then
    If GetVar(App.Path & "\Cuentas\" & TeEquisTes, "Numero de Cliente", "Cliente") = nCliente Then
       txtCuenta.Text = GetVar(App.Path & "\Cuentas\" & TeEquisTes, "Numero de Cliente", "Cliente")
       txtNombre.Text = GetVar(App.Path & "\Cuentas\" & TeEquisTes, "Nombre Y Apellido", "Nombre")
       Exit Do
    End If
  End If
  TeEquisTes = Dir
Loop

If txtCuenta.Text = "" Then txtCuenta.Text = "Sin Datos"
If txtNombre.Text = "" Then txtNombre.Text = "Sin Datos"


End Sub