Skip to content

Instantly share code, notes, and snippets.

kumatti1

Block or report user

Report or block kumatti1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kumatti1
kumatti1 / Module1.bas
Created Jul 22, 2019
現行のEdgeさん
View Module1.bas
Option Explicit
Private Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub hoge()
Dim doc As Object
Set doc = CreateObject("htmlfile")
With doc
.parentWindow.navigate "https://www.yahoo.co.jp/"
While .readystate <> "complete"
@kumatti1
kumatti1 / Module1.bas
Last active May 27, 2019
諸般の事情により、久し振りにVBAを使ったなー。
View Module1.bas
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&
View F12.cpp
//#define UNICODE
#include <stdio.h>
#include <windows.h>
#include <Oleacc.h>
#include <stdio.h>
#include <Shlwapi.h>
#include <shobjidl.h>
#import <mshtml.tlb>
#pragma comment(lib, "shlwapi.lib")
View Gist.cpp
//#define UNICODE
#include <stdio.h>
#include <windows.h>
#include <Oleacc.h>
#include <stdio.h>
#include <Shlwapi.h>
#include <shobjidl.h>
#import <mshtml.tlb>
#pragma comment(lib, "shlwapi.lib")
View Module1.bas
Option Explicit
Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type
Const IID_IDownloadManager = "{988934A4-064B-11D3-BB80-00104B35E7F9}"
@kumatti1
kumatti1 / Module1.bas
Created Mar 23, 2017
TaskDialogIndirect
View Module1.bas
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
@kumatti1
kumatti1 / Module1.bas
Created Mar 23, 2017
メモ帳のダイアログを閉じる
View Module1.bas
Option Explicit
'参照設定 UIAutomationClient
Private Declare PtrSafe Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As LongPtr, ByVal hWnd2 As LongPtr, ByVal lpsz1 As String, ByVal lpsz2 As String) As LongPtr
Sub hoge()
Dim o As IUIAutomation
Dim e As IUIAutomationElement
Set o = New CUIAutomation
Dim h As LongPtr
@kumatti1
kumatti1 / Module1.bas
Created Mar 16, 2017
ファイル指定で、任意の右クリックメニュー呼び出し
View Module1.bas
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 _
@kumatti1
kumatti1 / Module1.bas
Created Mar 16, 2017
ファイル指定で既定の右クリック呼び出し
View Module1.bas
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 _
View Module1.bas
Option Explicit
Private Declare PtrSafe _
Function SHGetDesktopFolder Lib "Shell32.dll" ( _
ByRef ppshf As IUnknown) As Long
Private Declare PtrSafe _
Function SHInvokeDefaultCommand Lib "shlwapi.dll" Alias "#279" ( _
ByVal hWnd As LongPtr, _
You can’t perform that action at this time.