Last active
May 27, 2019 22:42
-
-
Save kumatti1/09a2d5353a33daf5d5d73b5a8a25863f to your computer and use it in GitHub Desktop.
諸般の事情により、久し振りにVBAを使ったなー。
This file contains hidden or 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 FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPtr | |
Declare PtrSafe Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, lParam As Any) As LongPtr | |
Sub hoge() | |
Dim hWnd&: hWnd = FindWindow("Notepad", vbNullString) | |
SendMessage hWnd, &H111, 4, ByVal 0& | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment