forked from tannerhelland/VBIDEUtils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
VBIDE.cls
98 lines (86 loc) · 2.94 KB
/
VBIDE.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "class_VBIDE"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 07/04/2001
' * Time : 13:46
' * Module Name : class_VBIDE
' * Module Filename : VBIDE.cls
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
Option Explicit
Public Sub HookVBIDE()
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 07/04/2001
' * Time : 13:46
' * Module Name : class_VBIDE
' * Module Filename : VBIDE.cls
' * Procedure Name : Go
' * Parameters :
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
'load our macros
On Error GoTo err
'subclass the vbide
MDIClientHWND = FindWindowEx(VBInstance.MainWindow.hWnd, 0, "MDIClient", vbNullString)
oProc = GetWindowLong(MDIClientHWND, GWL_WNDPROC)
SetWindowLong MDIClientHWND, GWL_WNDPROC, AddressOf WindowProc
oMainProc = GetWindowLong(VBInstance.MainWindow.hWnd, GWL_WNDPROC)
SetWindowLong VBInstance.MainWindow.hWnd, GWL_WNDPROC, AddressOf MainWindowProc
'set our bg pic propps
SubclassIDE_Module.Width = frmSplash.ScaleWidth
SubclassIDE_Module.Height = frmSplash.ScaleHeight
SubclassIDE_Module.dc = GetDC(MDIClientHWND)
Exit Sub
err:
'hmm.. got an error?
err.Clear
MsgBox "error " & err.Description
End Sub
Public Sub unHookVBIDE()
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 07/04/2001
' * Time : 13:46
' * Module Name : class_VBIDE
' * Module Filename : VBIDE.cls
' * Procedure Name : Go
' * Parameters :
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
On Error GoTo err
' *** unsubclass the vbide
Call UnhookWindowsHookEx(VBInstance.MainWindow.hWnd)
Exit Sub
err:
'hmm.. got an error?
err.Clear
MsgBox "error " & err.Description
End Sub