設定例

VB.NET用

Dim hWnd As Integer

Dim wMsg As Short

Dim DetOn, Ret As Integer

 

hWnd = Handle.ToInt32' Handleは現在実行中のプロシージャのハンドル

 

wMsg = WM_USER + &H31S   ' 0x400~0x7FFFの任意の番号

DetOn = 1   ' DET(トリガ)のイベント発生

 

C言語用

HANDLE hWnd;

WORD wMsg;

DWORD DetOn, Ret;

 

hWnd = hDlg;/* hDlgは現在実行中のプロシージャのハンドル */

 

wMsg = WM_USER + 0x31;   /* 0x400~0x7FFFの任意の番号 */

DetOn = 1;   /* DET(トリガ)のイベント発生 */

Ret = GpSetEventDet(hWnd, wMsg, DetOn);

 

C#用

int hWnd;

ushort wMsg;

uint DetOn, Ret;

 

hWnd = this.Handle.ToInt32();/* this.Handleは現在実行中のプロシージャのハンドル */

 

wMsg = WM_USER + 0x31;   /* 0x400~0x7FFFの任意の番号 */

DetOn = 1;   /* DET(トリガ)のイベント発生 */

Ret = gpib.SetEventDet(hWnd, wMsg, DetOn);

 

Python用

wMsg = ctypes.c_ushort()

DetOn, Ret = ctypes.c_ulong(), ctypes.c_ulong()

 

hWnd = ctypes.windll.user32.FindWindowW(0, "Name") # "Name"は現在実行中のプロシージャのキャプション

 

wMsg.value = WM_USER + 0x31   # 0x400~0x7FFFの任意の番号

DetOn.value = 1   # DET(トリガ)のイベント発生

Ret.value = GpibPy.GpSetEventDet(hWnd, wMsg, DetOn)