I imported this project from VB(v.6) into VB.net and received this message:
'UPGRADE_WARNING: Add a delegate for AddressOf WinProc1"
I would appreciate any assistance in defining a delegate for AddressOf WinProc1.
I have this Function WinProc1 defined in my Main module called Main1.
'MessageBox Positioning logic
Function WinProc1(ByVal lMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
If lMsg = HCBT_ACTIVATE Then
'Show the MsgBox at a fixed location ( 2,445)
SetWindowPos(wParam, 0, 2, 445, 0, 0, SWP_NOSIZE Or SWP_NOZORDER Or SWP_NOACTIVATE)
'Release the CBT hook
UnhookWindowsHookEx(hHook)
End If
WinProc1 = False
End Function
I have this click event defined in my form called frmInput, which displays a calculated monthly payment in a messagebox:
Private Sub cmdCalc_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdCalc.Click
'Set up the CBT hook (positioning logic for the message box).
'This message box has been positioned at (2
'UPGRADE_WARNING: Add a delegate for AddressOf WinProc1"
I would appreciate any assistance in defining a delegate for AddressOf WinProc1.
I have this Function WinProc1 defined in my Main module called Main1.
'MessageBox Positioning logic
Function WinProc1(ByVal lMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
If lMsg = HCBT_ACTIVATE Then
'Show the MsgBox at a fixed location ( 2,445)
SetWindowPos(wParam, 0, 2, 445, 0, 0, SWP_NOSIZE Or SWP_NOZORDER Or SWP_NOACTIVATE)
'Release the CBT hook
UnhookWindowsHookEx(hHook)
End If
WinProc1 = False
End Function
I have this click event defined in my form called frmInput, which displays a calculated monthly payment in a messagebox:
Private Sub cmdCalc_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdCalc.Click
'Set up the CBT hook (positioning logic for the message box).
'This message box has been positioned at (2
,445[top])
hInst = GetWindowLong(frmMDI.DefInstance.Handle.ToInt32, GWL_HINSTANCE)
Thread = GetCurrentThreadId()
'UPGRADE_WARNING: Add a delegate for AddressOf WinProc1"
hHook = SetWindowsHookEx(WH_CBT, AddressOf WinProc1, hInst, Thread)
MsgBox("The monthly payment will be " & strPayment)
End Sub
Thank you ahead of time for your assistance, JorgeL.
hInst = GetWindowLong(frmMDI.DefInstance.Handle.ToInt32, GWL_HINSTANCE)
Thread = GetCurrentThreadId()
'UPGRADE_WARNING: Add a delegate for AddressOf WinProc1"
hHook = SetWindowsHookEx(WH_CBT, AddressOf WinProc1, hInst, Thread)
MsgBox("The monthly payment will be " & strPayment)
End Sub
Thank you ahead of time for your assistance, JorgeL.