My mod source
WK2B :: Programming
Page 1 of 1
My mod source
- Code:
Public Class Form1
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
OFD1.ShowDialog()
End Sub
Private Function OFD1() As Object
Throw New NotImplementedException
End Function
Private Sub cmdopen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdopen.Click
OFD1.ShowDialog()
End Sub
Private Sub cmdmod_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdmod.Click
Dim fs As System.IO.FileStream
Dim bw As System.IO.BinaryWriter
fs = New System.IO.FileStream(OFD1.FileName, IO.FileMode.OpenOrCreate) 'Uses the file you just opened
bw = New System.IO.BinaryWriter(fs) 'tells the binary writer to write to the file you opened
fs.Position = &H0 'offset to write (i told it to start at the beginning of the file.)
bw.Write("This is a test!") 'value to write. if you want to write a hex value, make sure you have "&H" before it.
fs.Close()
bw.Close()
MsgBox.Show("Modded")
End Sub
End Class
If your not sure how to use it please dont ask please. Only for experienced coders.
WK2B :: Programming
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|