VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Cause Fatal Errors In Your Program

by Will Brendel (5 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (4 Votes)

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!

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)

Rate Cause Fatal Errors In Your Program

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

Download this snippet    Add to My Saved Code

Cause Fatal Errors In Your Program Comments

No comments have been posted about Cause Fatal Errors In Your Program. Why not be the first to post a comment about Cause Fatal Errors In Your Program.

Post your comment

Subject:
Message:
0/1000 characters