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
Wrap
BASIC Source File
|
2006-08-30
|
1KB
|
34 lines
Attribute VB_Name = "modIOLEInPlaceActivate"
Option Explicit
' ===========================================================================
' Filename: mIOleInPlaceActivate.bas
' Author: Mike Gainer, Matt Curland and Bill Storage
' Date: 09 January 1999
'
' Requires: OleGuids.tlb (in IDE only)
'
' Description:
' Allows you to replace the standard IOLEInPlaceActiveObject interface for a
' UserControl with a customisable one. This allows you to take control
' of focus in VB controls.
' The code could be adapted to replace other UserControl OLE interfaces.
'
' ---------------------------------------------------------------------------
' Visit vbAccelerator, advanced, free source for VB programmers
' http://vbaccelerator.com
' ===========================================================================
Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type
Private Declare Function CLSIDFromString Lib "ole32.dll" (ByVal lpsz As Long, rguid As GUID) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)
Public Const S_FALSE = 1
Public Const S_OK = 0
Public Type IPAOHookStruct 'IOleInPlaceActiveObjectHook
lpVTable As Long 'VTable pointer
ubli zO