WK2B
Would you like to react to this message? Create an account in a few clicks or log in to continue.

My mod source

Go down

My mod source Empty My mod source

Post  Seminoles Thu Dec 03, 2009 12:59 am

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.
Seminoles
Seminoles
Admin

Posts : 17
Join date : 2009-11-26
Location : United States

http://wk2b.tk

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum