■VB.NET用
Dim hWnd As Integer
Dim wMsg As Short
Dim DecOn, Ret As Integer
hWnd = Handle.ToInt32' Handleは現在実行中のプロシージャのハンドル
wMsg = WM_USER + &H32S ' 0x400~0x7FFFの任意の番号
DecOn = 1 ' DEC(デバイスクリア)のイベント発生
Ret = GpSetEventDec(hWnd, wMsg, DecOn)
■C言語用
HANDLE hWnd;
WORD wMsg;
DWORD DecOn, Ret;
hWnd = hDlg;/* hDlgは現在実行中のプロシージャのハンドル */
wMsg = WM_USER + 0x32; /* 0x400~0x7FFFの任意の番号 */
DecOn = 1; /* DEC(デバイスクリア)のイベント発生 */
Ret = GpSetEventDec(hWnd, wMsg, DecOn);
■C#用
int hWnd;
ushort wMsg;
uint DecOn, Ret;
hWnd = this.Handle.ToInt32();/* this.Handleは現在実行中のプロシージャのハンドル */
wMsg = WM_USER + 0x32; /* 0x400~0x7FFFの任意の番号 */
DecOn = 1; /* DEC(デバイスクリア)のイベント発生 */
Ret = gpib.SetEventDec(hWnd, wMsg, DecOn);
■Python用
wMsg = ctypes.c_ushort()
DecOn, Ret = ctypes.c_ulong(), ctypes.c_ulong()
hWnd = ctypes.windll.user32.FindWindowW(0, "Name") # "Name"は現在実行中のプロシージャのキャプションル
wMsg.value = WM_USER + 0x32 # 0x400~0x7FFFの任意の番号
DecOn.value = 1 # DEC(デバイスクリア)のイベント発生
Ret.value = GpibPy.GpSetEventDec(hWnd, wMsg, DecOn)