View Class1.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Implements IUIAutomationEventHandler | |
Private Sub IUIAutomationEventHandler_HandleAutomationEvent(ByVal sender As UIAutomationClient.IUIAutomationElement, ByVal eventId As Long) | |
Dim iElemFound As IUIAutomationElement | |
Set iElemFound = GetElement(o, sender, "はい(Y)", 0) | |
If iElemFound Is Nothing Then Exit Sub | |
If iElemFound.CurrentName = "はい(Y)" Then | |
Dim InvokePattern As IUIAutomationInvokePattern |
View gist:1726828
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Enum ICONS | |
TD_WARNING_ICON = 65535 | |
TD_ERROR_ICON = 65534 | |
TD_INFORMATION_ICON = 65533 | |
TD_SHIELD_ICON = 65532 | |
End Enum | |
Enum TASKDIALOG_FLAGS |
View gist:1856305
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Enum MONITORS | |
MONITOR_DEFAULTTONULL | |
MONITOR_DEFAULTTOPRIMARY | |
MONITOR_DEFAULTTONEAREST | |
End Enum | |
Const PHYSICAL_MONITOR_DESCRIPTION_SIZE = 128 - 1 |
View gist:2165098
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
'http://www.ka-net.org/office/of12.html | |
'Microsoft HTML Object Library | |
Private d As MSHTML.HTMLDocument | |
Private w As MSHTML.IHTMLWindow2 | |
Private TimerId As Long |
View Module1.bas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Declare PtrSafe Function FindWindowEx Lib "user32" Alias "FindWindowExW" (ByVal hWnd1 As LongPtr, ByVal hWnd2 As LongPtr, ByVal lpsz1 As LongPtr, ByVal lpsz2 As LongPtr) As LongPtr | |
Private Declare PtrSafe Function VirtualProtect Lib "kernel32" (ByVal lpAddress As Any, _ | |
ByVal dwSize As LongLong, _ | |
ByVal flNewProtect As Long, _ | |
lpflOldProtect As Long) As Long | |
Const PAGE_EXECUTE_READ = &H20& | |
Const PAGE_EXECUTE = &H10 | |
Private Declare PtrSafe Function SetWindowSubclass Lib "C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.16384_none_62475f7becb72503\comctl32.dll" (ByVal hWnd As LongPtr, ByVal pfnSubclass As LongPtr, ByVal uIdSubclass As LongPtr, ByVal dwRefData As LongPtr) As Long | |
Private Declare PtrSafe Function RemoveWindowSubclass Lib "C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.16384_none_62475f7becb72503\comctl32.dll" (ByVal hWnd As LongPtr, ByVal pfnSubclass As LongPtr, ByVal uIdSubclass As Lon |
View UserForm1.frm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Type SECURITY_ATTRIBUTES | |
nLength As Long | |
lpSecurityDescriptor As LongPtr | |
bInheritHandle As Long | |
End Type | |
Private Declare Function MsgWaitForMultipleObjects Lib "user32" _ | |
(ByVal nCount As Long, pHandles As Long, _ | |
ByVal fWaitAll As Long, ByVal dwMilliseconds As Long, _ | |
ByVal dwWakeMask As Long) As Long |
View Module2.bas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Declare Function ILCreateFromPathW& Lib "Shell32.dll" (ByVal pszPath&) | |
Declare Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" _ | |
(Destination As Any, Source As Any, ByVal Length As Long) | |
Declare Sub ILFree Lib "Shell32.dll" (ByVal pidl&) | |
Declare Function ILGetSize& Lib "Shell32.dll" (ByVal pidl&) | |
Private Declare _ | |
Function InitVariantFromBuffer Lib "propsys.dll" ( _ | |
ByVal pv As LongPtr, _ |
View Module1.bas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Type SECURITY_ATTRIBUTES | |
nLength As Long | |
lpSecurityDescriptor As LongPtr | |
bInheritHandle As Long | |
End Type | |
Private Declare Function MsgWaitForMultipleObjects Lib "user32" _ | |
(ByVal nCount As Long, pHandles As Long, _ | |
ByVal fWaitAll As Long, ByVal dwMilliseconds As Long, _ |
View Module1.bas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Type SECURITY_ATTRIBUTES | |
nLength As Long | |
lpSecurityDescriptor As LongPtr | |
bInheritHandle As Long | |
End Type | |
Private Declare Function MsgWaitForMultipleObjects Lib "user32" _ | |
(ByVal nCount As Long, pHandles As Long, _ | |
ByVal fWaitAll As Long, ByVal dwMilliseconds As Long, _ |
View Module1.bas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Type GUID | |
Data1 As Long | |
Data2 As Integer | |
Data3 As Integer | |
Data4(0 To 7) As Byte | |
End Type | |
Private Declare PtrSafe _ |
NewerOlder