Im a german student and this year i had to write a paper in my computer science class. i chose to write about hacks and trainers in pc games and wanted to code a little trainer myself for the game GTA San Andreas! 
) I still dont have a working trainer and all i would need is something simple just to have something to write about in my main part of the paper.

or im just stupid...Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End Sub
Private Declare Function WriteProcessMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function CloseHandle Lib "kernel32" ( _
ByVal hObject As Integer) As Integer
Public Declare Function OpenProcess Lib "kernel32" ( _
ByVal dwDesiredAccess As Integer, _
ByVal bInheritHandle As Integer, _
ByVal dwProcessId As Integer) As Integer
Public Sub WriteMemory(ByVal processName As String, ByVal Address As Integer, ByVal Value As ULong, ByVal Bytes As Integer)
Dim pProcess As Process() = Process.GetProcessesByName(processName)
If Not pProcess.Length = 0 Then
For Each p In pProcess
If p.ProcessName = processName Then
Dim hObject As IntPtr = OpenProcess(&H1F0FFF, 0, p.Id)
WriteProcessMemory(hObject, Address, Value, Bytes, Nothing)
CloseHandle(hObject)
End If
Next
Else
MsgBox("Please open " & processName & " before trying to write in.", MsgBoxStyle.Information, "Process not found!")
End If
End Sub
works great. 

im so sorry that im asking those stupid questions but im really desperate.
. You can freeze it by typing this cheat:

xD
If not than thanks anyways -.-Dim pProc As Process() = Process.GetProcessesByName(processName)
For Each p In pProc
'Code
Next
If p.ProcessName = processName Then
Dim hObject As IntPtr = OpenProcess(&H1F0FFF, 0, p.Id)
WriteProcessMemory(hObject, Address, Value, Bytes, Nothing)
CloseHandle(hObject)
End If