VERSION 5.00
Begin VB.Form Info 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "Information Window"
   ClientHeight    =   2085
   ClientLeft      =   10050
   ClientTop       =   945
   ClientWidth     =   1860
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   139
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   124
   ShowInTaskbar   =   0   'False
   Visible         =   0   'False
   Begin VB.CommandButton Command1 
      Caption         =   "Try from here"
      Height          =   765
      Left            =   45
      TabIndex        =   13
      Top             =   1296
      Width           =   720
   End
   Begin VB.TextBox Text1 
      Height          =   288
      Index           =   0
      Left            =   864
      TabIndex        =   11
      Tag             =   "false"
      Text            =   "0"
      Top             =   1728
      Width           =   420
   End
   Begin VB.TextBox Text1 
      Height          =   288
      Index           =   1
      Left            =   1392
      TabIndex        =   10
      Tag             =   "false"
      Text            =   "0"
      Top             =   1728
      Width           =   420
   End
   Begin VB.TextBox Text2 
      Alignment       =   2  'Center
      Height          =   288
      Left            =   756
      TabIndex        =   2
      Text            =   "&H89ABCD"
      Top             =   336
      Width           =   1056
   End
   Begin VB.TextBox Text3 
      Alignment       =   2  'Center
      Height          =   288
      Left            =   792
      TabIndex        =   1
      Text            =   "&H000000"
      Top             =   0
      Width           =   1020
   End
   Begin VB.TextBox Text4 
      Alignment       =   2  'Center
      Height          =   288
      Left            =   936
      TabIndex        =   0
      Text            =   "0"
      Top             =   672
      Width           =   876
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "x"
      Height          =   192
      Index           =   1
      Left            =   1296
      TabIndex        =   12
      Top             =   1776
      Width           =   72
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "0 x 0"
      Height          =   192
      Left            =   336
      TabIndex        =   9
      Tag             =   "0"
      Top             =   1248
      Width           =   1476
   End
   Begin VB.Label Label20 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "(0 x 0)"
      Height          =   192
      Left            =   864
      TabIndex        =   8
      Tag             =   "0"
      Top             =   1440
      Width           =   420
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Header"
      Height          =   195
      Index           =   1
      Left            =   90
      TabIndex        =   7
      Top             =   390
      Width           =   555
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Offset"
      Height          =   195
      Index           =   2
      Left            =   90
      TabIndex        =   6
      Top             =   45
      Width           =   420
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Length"
      Height          =   195
      Index           =   4
      Left            =   150
      TabIndex        =   5
      Top             =   705
      Width           =   495
   End
   Begin VB.Label Label10 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Compressed"
      Height          =   195
      Left            =   150
      TabIndex        =   4
      Top             =   990
      Width           =   945
   End
   Begin VB.Label Label11 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "0"
      Height          =   192
      Left            =   1176
      TabIndex        =   3
      Top             =   1008
      Width           =   636
   End
End
Attribute VB_Name = "Info"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Dim contador, contador2, contador3, contador4
contador = Info.Text1(0).Text
contador2 = val2(Left(Info.Text3.Text, 8))
bucleflag = True
bucleextract = True
contador4 = Abs(Val(InputBox("Please choose the delay between each try.", , 0)))
Do While bucleflag And bucleextract
    contador2 = contador2 + 1
    Info.Text3.Text = "&H" & String(6 - Len(Hex(contador2)), "0") & Hex(contador2)
    Info.Text1(0).Text = contador
    Info.Text1(1).Text = 200
    Graphread.Readgraphics_Click
    DoEvents
    Graphread.Label8.Visible = True
    contador3 = Timer + contador4
    Do While contador3 - Timer > 0
        Graphread.Label8.Caption = "Waiting..." & Int(1 + contador3 - Timer)
        DoEvents
    Loop
    Graphread.Label8.Visible = False
Loop
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
activar KeyCode, Shift, Me
End Sub

Private Sub Form_Load()
Picture = Graphread.Picture

End Sub

Sub label5_Click()
Info.Text1(0).Text = -1
Info.Text1(1).Text = -1
Info.Text1(0).Text = Info.Label5.Tag
Info.Text1(1).Text = Info.Label20.Tag
If Info.Text1(0).Text = 0 And Info.Text1(0).Text = 0 Then
    Info.Text1(0).Text = dimensions(Graphread.List2.ListIndex, 1)
    Info.Text1(1).Text = dimensions(Graphread.List2.ListIndex, 2)
End If
End Sub

Private Sub text1_Change(Index As Integer)
If Info.Text1(0).Tag = "True" Or Info.Text1(1).Tag = "True" Then Exit Sub
Info.Text1(0).Tag = "True"
Info.Text1(1).Tag = "True"
Info.Text1(Index).Text = Abs(val2(Info.Text1(Index).Text))

If val2(Info.Text1(Index).Text) > 32767 Then 'DM2
    Info.Text1(Index).Text = Info.Text1(Index).Text - 32768
    Graphread.Picture2.Width = Info.Text1(0).Text
    Graphread.Picture2.Height = Info.Text1(1).Text
End If

If Info.Label5.Tag = val2(Info.Text4.Text) And Info.Text1(1).Text > 240 Then    'Sound?
    Info.Text1(0).Text = 0
    Info.Text1(1).Text = 0
    Graphread.Picture2.Width = Info.Text1(0).Text
    Graphread.Picture2.Height = Info.Text1(1).Text
End If

If dimensions(Graphread.List2.ListIndex, 1) > dimensions(Graphread.List2.ListIndex, 0) _
And dimensions(Graphread.List2.ListIndex, 2) = 0 Then 'ST CSB
    Info.Text1(0).Text = Info.Label5.Tag / 2
    Info.Text1(1).Text = Info.Label20.Tag / 8
    Graphread.Picture2.Width = Info.Text1(0).Text
    Graphread.Picture2.Height = Info.Text1(1).Text
End If

If val2(Info.Text1(Index).Text) > IIf(Index = 0, 320, 240) And Graphread.Viewnotbig.Checked Then
    Info.Text1(Index).Text = 0
    Graphread.Picture2.Width = Info.Text1(0).Text
    Graphread.Picture2.Height = Info.Text1(1).Text
End If

If LCase(Left(Graphread.List2.Text, 11)) = "rawportrait" Then
    Info.Text1(1).Text = 28
    Info.Text1(0).Text = 32
    Graphread.Picture2.Width = Info.Text1(0).Text
    Graphread.Picture2.Height = Info.Text1(1).Text
End If
If Index = 0 Then Graphread.Picture2.Width = Info.Text1(0).Text
If Index = 1 Then Graphread.Picture2.Height = Info.Text1(1).Text
Info.Text1(0).Tag = False
Info.Text1(1).Tag = False
End Sub

Sub text2_LostFocus()
hexs = Hex(val2(Left(Info.Text2.Text, 8)))
Info.Text2.Text = "&H" & String(6 - Len(hexs), "0") & hexs
setcolors
End Sub

Sub label20_Click()
Info.Text1(0).Text = dimensions(Graphread.List2.ListIndex, 1)
Info.Text1(1).Text = dimensions(Graphread.List2.ListIndex, 2)
End Sub
Private Sub text1_LostFocus(Index As Integer)
SavePicture Graphread.Picture2.Image, "tmpimage"
Graphread.Picture2.Picture = LoadPicture("tmpimage")
If Len(Dir("tmpimage")) > 0 Then Kill "tmpimage"
End Sub

Private Sub text3_LostFocus()
hexs = Hex(val2(Left(Info.Text3.Text, 8)))
Info.Text3.Text = "&H" & String(6 - Len(hexs), "0") & hexs
cargarheader -1
End Sub

Private Sub Form_Resize()
If ScaleWidth > 800 Then Width = 12 * 800
If ScaleHeight > 600 Then Height = 12 * 600
End Sub

