el boton de cerrar de un frame???? los frame no tienen botones o no entendi
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 FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long
Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Any, ByVal wParam As Any, ByVal lParam As Any) As Long
Private Sub Form_Load()
On Error Resume Next
'KPD-Team 1999
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
'We're going to call an API-function, without declaring it!
Dim lb As Long, pa As Long
'map 'user32' into the address space of the calling process.
lb = LoadLibrary("user32")
'retrieve the address of 'SetWindowTextA'
pa = GetProcAddress(lb, "SetWindowTextA")
'Call the SetWindowTextA-function
CallWindowProc pa, Me.hWnd, "Hello !", ByVal 0&, ByVal 0&
'unmap the library's address
FreeLibrary lb
End Sub
CallWindowProc pa, Me.hWnd, "Hello !", ByVal 0&, ByVal 0&
dir = VarPtr(A0)
dir = dir + 2
CopyMemory ByVal VarPtr(destino), ByVal dir, 10
Debug.Print destino
Option Explicit
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)
Private Type AAA
A1 As Integer
A2 As Integer
A3 As Long
A4 As String
End Type
Private Sub Form_Load()
Dim A0 As AAA
Dim dir As Long
Dim DEST_integer As Integer
dim DEST_long as long
dim DEST_CHAR as string
A0.a1 = 50
A0.A2 = 20
A0.A3 = 50000
A0.A4 = "R"
dir = VarPtr(A0)
dir = dir + XXX
CopyMemory ByVal VarPtr(<type DESTINO>), ByVal dir, LEN DE BYTES
Debug.Print destino
End Sub