Cause Fatal Errors In Your Program
![Visual Basic 6, or VB Classic Visual Basic 6, or VB Classic](https://www.fortypoundhead.com//assets/img/icons/v7/vb6.png)
This code just causes those neat little errors Windows sends us every so often. I don't think there's a use for this, but here it is anyway. Just a note, it also closes the VB IDE when called so watch out!
Original Author: Will Brendel
Inputs
Buttons: cmdFatalAppExit, cmdFatalExit
Side Effects
Crashes VB IDE if called from within the IDE.
API Declarations
Private Declare Sub FatalAppExit Lib "kernel32" Alias "FatalAppExitA" (ByVal uAction As Long, ByVal lpMessageText As String)
Private Declare Sub FatalExit Lib "kernel32" (ByVal code As Long)
Code
Private Sub cmdFatalAppExit_Click()
FatalAppExit 0, "You can replace this message with one of your own." & vbLf & vbLf & "Multiple lines are allowed too!"
End Sub
Private Sub cmdFatalExit_Click()
FatalExit 1
End Sub
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.