home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 4_2005-2006.ISO / data / Zips / PassBox___201883982006.psc / PassBox / Modules / modIOLEInPlaceActivate.bas
BASIC Source File  |  2006-08-30  |  1KB  |  34 lines

  1. Attribute VB_Name = "modIOLEInPlaceActivate"
  2. Option Explicit
  3.  
  4. ' ===========================================================================
  5. ' Filename:    mIOleInPlaceActivate.bas
  6. ' Author:      Mike Gainer, Matt Curland and Bill Storage
  7. ' Date:        09 January 1999
  8. '
  9. ' Requires:    OleGuids.tlb (in IDE only)
  10. '
  11. ' Description:
  12. ' Allows you to replace the standard IOLEInPlaceActiveObject interface for a
  13. ' UserControl with a customisable one.  This allows you to take control
  14. ' of focus in VB controls.
  15.  
  16. ' The code could be adapted to replace other UserControl OLE interfaces.
  17. '
  18. ' ---------------------------------------------------------------------------
  19. ' Visit vbAccelerator, advanced, free source for VB programmers
  20. '     http://vbaccelerator.com
  21. ' ===========================================================================
  22. Private Type GUID
  23.     Data1 As Long
  24.     Data2 As Integer
  25.     Data3 As Integer
  26.     Data4(0 To 7) As Byte
  27. End Type
  28. Private Declare Function CLSIDFromString Lib "ole32.dll" (ByVal lpsz As Long, rguid As GUID) As Long
  29. Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)
  30. Public Const S_FALSE = 1
  31. Public Const S_OK = 0
  32. Public Type IPAOHookStruct 'IOleInPlaceActiveObjectHook
  33.     lpVTable As Long 'VTable pointer
  34.     ubli zO