Search Tools Links Login

Cause Fatal Errors In Your Program

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


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)


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

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 113 times


Visual Basic 6


No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.