Hey Hey Hey! The Following tutorial will show you how to make a DLL and how to interact it to a WindowsFormApplication!
*Note: The following tutorial will NOT show how to make a hack in a dll, just a simple program... You can start from here learning about dlls, so don't mess me with stupid questions and comments!
Ok Lets Start...
-----------------------------------------------------------------
The Dll
-----------------------------------------------------------------
Open Visual Basic, Start a new project, name it to whatever you want and select Class Library, then press OK...
Now you should see on the right "My Project", Press it...
Now a new window should appear with many informations about your project, in the Tabs, press "Reference"
A New window will appear and there is a button named of "Add..."
Press It!
A New window appears and there you must search for:
"System.Windows.Forms" in .NET Tab...
When you find it, selelect it and press OK...
Now, go to your DLL File Named of "Class1" that you can find on the right...
Type the following code on top, upper then "Public Class Class1":
Code:
Imports System.Windows.Forms
Ok now type the following code between "Public Class Class1" and "End Sub":
Code:
Public Sub ShowErrorMessage(ByVal TheText As String)
MsgBox(TheText, MsgBoxStyle.Critical, "Error")
Now...
Down of "End Sub" Type the following:
Code:
Public Sub AddText(ByVal Box As TextBox, ByVal Text As String)
Box.Text += Text
End Sub
Now it should look like this:
Code:
Imports System.Windows.Forms
Public Class Class1
Public Sub ShowErrorMessage(ByVal TheText As String)
MsgBox(TheText, MsgBoxStyle.Critical, "Error")
End Sub
Public Sub AddText(ByVal Box As TextBox, ByVal Text As String)
Box.Text += Text
End Sub
End Class
If it looks like that Save your project...
By going o "File" and Save All... Save to your Desktop or whenever you want... Then (IMPORTANT Build your Project by going to "Build" and "Build (your project name)"
-----------------------------------------------------------------
The Form and Dll Interaction...
-----------------------------------------------------------------
Now... Start a New Project, name it whatever you want and select WindowsFormApplication1
In the form add 2 Buttons, and 2 TextBoxs... At the first TextBox Make it as a MultiLine TextBox and make it bigger... The 2nd Textbox let it as it starts...
Now Go to "My Project" like you did in the DLL Part... And go to "Reference" again, Press "Add..." and go to the "Browse" Tab... There Search for your DLL project, and choose the built project... (bin -> release -> select DLL)
Press button 1 to go to the code index and type right down of "Public Class Form1" the following:
Code:
Dim TheDll As New DLL.Class1
Go to Form1, and press the button 1, type the following on it:
Code:
TheDll.AddText(TextBox1, TextBox2.Text)
Go back to the form and press the button2 and type the following on it:
Code:
TheDll.ShowErrorMessage("Your Message Here")
At the end it should look like this:
Code:
Public Class Form1
Dim TheDll As New DLL.Class1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TheDll.AddText(TextBox1, TextBox2.Text)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TheDll.ShowErrorMessage("Your Text Here")
End Sub
End Class
Save All.... Build Project and it should look like this:
Your project is done!
Type anything in the textbox between the 2 buttons, and press Add Text, the text will be added to the bigger textbox... If you press Error Button an Error Mensage will appear with your custom message at the code!
See? Its Quite Simple, now apply your knowledges and build a hack in a dll!
Have Fun!