I am wondering if I am thinking about this correctly. What I am trying to do is have the exe file in the ShellExecute actually execute if the app is closed via a reboot, (not closed using the application but literaly hammering the reset button on the machine.
Will putting the ShellExecute in the QueryUnload event cause this to take place and fire myapp.exe in this code?
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbAppWindows Then
ShellExecute hwnd, "open", App.Path & "\myapp.exe", vbNullString, vbNullString, SW_SHOWMAXIMIZED
End If
End Sub
Will putting the ShellExecute in the QueryUnload event cause this to take place and fire myapp.exe in this code?
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbAppWindows Then
ShellExecute hwnd, "open", App.Path & "\myapp.exe", vbNullString, vbNullString, SW_SHOWMAXIMIZED
End If
End Sub