View Single Post
Old May 22nd, 2008 (4:34 PM).
cooley's Avatar
cooley cooley is offline
///Keepin' it simple
  • Silver Tier
Join Date: Feb 2007
Location: United States
Age: 23
Gender: Male
Nature: Impish
Posts: 1,150
Darthatron, I need your help with VB 6

1. What is Len, LenB etc. I always see them everywhere, but I never know what they mean.

2. Every time I Write hex back to the ROM then it puts the data one byte ahaed or behind the actual offset. Do you know why? The code is below:

Option Explicit

Dim sFile As String
Private Sub Command1_Click()
Dim iFileNum As Integer

    iFileNum = FreeFile
    sFile = frmMain.CommonDialog1.FileName

If cmbPoke.Text = "" Then
MsgBox ("Pick a Pokemon please")


Open sFile For Binary As #iFileNum
    Put #iFileNum, &H5FDE, cmbPoke.ListIndex
    Close #iFileNum
Unload Me
End If
End Sub

3. I put cmbPoke.ListIndex, how does VB know we're talking about hex? For the pokemon numbers that is. When there aren't any hex values assigned to the Pokemon themselves?

Ex. I click Pikachu(&h19 and no. 25) how does it write 19 back to the rom when it's no. 25 on the list?

Reply With Quote