VB.NET
Dim hWnd As Integer
Dim wMsg As Short
Dim DetOn, Ret As Integer
hWnd = Handle.ToInt32 ' Handle is handle procedure in practice.
wMsg = WM_USER + &H31S ' A random number of 0x400-0x7FFF
DetOn = 1 ' Event of DET(Trigger) generation
Ret = GpSetEventDet(hWnd, wMsg, DetOn)
C
HANDLE hWnd;
WORD wMsg
DWORD DetOn, Ret;
HWnd = hDlg; /* hDlg is handle procedure in practice.*/
wMsg = WM_USER + 0x31; /* A random number of 0x400-0x7FFF */
DetOn = 1; /* Event of DET(Trigger) generation */
Ret = GpSetEventDet(hWnd, wMsg, DetOn);
C#
int hWnd;
ushort wMsg;
uint DetOn, Ret;
hWnd = this.Handle.ToInt32(); /* this.Handle is handle procedure in practice.*/
wMsg = WM_USER + 0x31; /* A random number of 0x400-0x7FFF */
DetOn = 1; /* Event of DET(Trigger) generation */
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" is caption of executing procedure.
wMsg.value = WM_USER + 0x31 # A random number of 0x400-0x7FFF
DetOn.value = 1 # Event of DET(Trigger) generation
Ret.value = GpibPy.GpSetEventDet(hWnd, wMsg, DetOn)