Hi,
I want to get the user to confirm that they want to shut down and application, with a 'Yes', 'No' message box.
Can someone give me a clue where to put it and how to process the 'no' option.
Many Thanks
I assume that you are referring to the situation where the WM_CLOSE message is fired via clicking on the 'X' close button.
Try this:
Function FORM1_WM_CLOSE ( _
hWndForm As Dword _ ' handle of Form
) As Long
If MsgBox( "Close application?", %MB_YESNO, "Confirm") = %IDNO Then
Function = %TRUE: Exit Function
End If
End Function
Cheers Paul,
Exactly what I was trying to do.
All the best for the new year.