[VB.Net] Make your own Fake error Builder 02-03-2011, 07:33 AM
#1
Step 1:
Start a new project and name it Builder. Start another project and name it stub.
Step 2:
Go in the builder project and add 4 radio buttons, 2 buttons and 2 textboxes making the second one multilines, the first button named "Test" and the second "Build". radiobutton1's text to "Critical" radiobutton2's text to "Information" radiobutton3's text to "YesNo" and radiobutton4's text to "exclamation".
Step 3:
Double click the "Test button and add this code:
Step 4:
Change the names of the components to these ones in front of them in the designer:
RadioButton1.Name = "critical"
RadioButton2.Name = "information"
RadioButton3.Name = "yesno"
RadioButton4.Name = "exclamation"
textbox1.name = "msgtitle"
textbox2.name = "msgbody"
Step 5:
Double click the build button and add this:
Step 6:
Go in the stub and add this code to the form's load:
Step 7:
The designer of the builder should look like something like this:
Step 8:
Its ready to use! congratz you made your own fake error generator :thumbs:
Start a new project and name it Builder. Start another project and name it stub.
Step 2:
Go in the builder project and add 4 radio buttons, 2 buttons and 2 textboxes making the second one multilines, the first button named "Test" and the second "Build". radiobutton1's text to "Critical" radiobutton2's text to "Information" radiobutton3's text to "YesNo" and radiobutton4's text to "exclamation".
Step 3:
Double click the "Test button and add this code:
Code:
if radiobutton1.checked = true then
msgbox(textbox2.text, msgboxstyle.critical, textbox1.text)
elseif radiobutton2.checked = true then
msgbox(textbox2.text, msgboxstyle.information, textbox1.text)
elseif radiobutton3.checked = true then
msgbox(textbox2.text, msgboxstyle.yesno, textbox1.text)
elseif radiobutton4.checked = true then
msgbox(textbox2.text, msgboxstyle.exclamation , textbox1.text)
end ifStep 4:
Change the names of the components to these ones in front of them in the designer:
RadioButton1.Name = "critical"
RadioButton2.Name = "information"
RadioButton3.Name = "yesno"
RadioButton4.Name = "exclamation"
textbox1.name = "msgtitle"
textbox2.name = "msgbody"
Step 5:
Double click the build button and add this:
Code:
io.file.copy(CurDir() & "\stub.exe", curdir & "\server.exe")
io.file.appendalltext( curdir & "\server.exe", "FileSpilt" & msgbody.text & "FileSpilt" & msgtitle.text & "FileSpilt" & critical.checked & "FileSpilt" & information.checked & "FileSpilt" & yesno.checked & "FileSpilt" & exclamation.checked )
MsgBox("Built!", msgboxstyle.Information)
process.start(curdir)Step 6:
Go in the stub and add this code to the form's load:
Code:
Me.Height = 0
Me.Width = 0
Me.Opacity = 0
Me.Hide()
Me.Visible = False
Me.ShowInTaskbar = False
Me.ShowIcon = False
Dim msgtitle, msgbody As String
Dim Critical, information, yesno, exclamation As Boolean
Dim BinText As String = IO.File.ReadAllText(Application.ExecutablePath)
If BinText.Contains("FileSpilt") = False Then Exit Sub
Dim ArrContents() As String = Split(BinText, "FileSpilt")
msgtitle = ArrContents(1)
msgbody = ArrContents(2)
Critical = ArrContents(3)
information = ArrContents(4)
yesno = ArrContents(5)
exclamation = ArrContents(6)
If Critical = True Then
MsgBox(msgbody, MsgBoxStyle.Critical, msgtitle)
ElseIf information = True Then
MsgBox(msgbody, MsgBoxStyle.Information, msgtitle)
ElseIf yesno = True Then
MsgBox(msgbody, MsgBoxStyle.YesNo, msgtitle)
ElseIf exclamation = True Then
MsgBox(msgbody, MsgBoxStyle.Exclamation, msgtitle)
End If
Me.Close()
Catch ex As Exception
End Try
End SubStep 7:
The designer of the builder should look like something like this:
Step 8:
Its ready to use! congratz you made your own fake error generator :thumbs:
Pierce the life fibers with your drill.
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)

![[Image: rytwG00.png]](http://i.imgur.com/rytwG00.png)