VERSION 5.00
Begin VB.Form frmWiz1 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Motomu"
   ClientHeight    =   4905
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   5745
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmWiz1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   327
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   383
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdChoose 
      Caption         =   "Open file"
      Height          =   495
      Left            =   2040
      TabIndex        =   7
      Top             =   4320
      Width           =   1695
   End
   Begin VB.Frame Frame1 
      Caption         =   "Midlet storage"
      Height          =   975
      Left            =   120
      TabIndex        =   4
      Top             =   3240
      Width           =   5535
      Begin VB.OptionButton Option2 
         Caption         =   "External storage      /b/mobile/kjava/[imei nr.]/J2MEST"
         Height          =   255
         Left            =   120
         TabIndex        =   6
         Top             =   600
         Width           =   5295
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Internal storage       /a/mobile/kjava/J2MEST"
         Height          =   255
         Left            =   120
         TabIndex        =   5
         Top             =   240
         Value           =   -1  'True
         Width           =   5175
      End
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "You can use s5vi's P2K Commander for the download:"
      Height          =   255
      Left            =   120
      TabIndex        =   8
      Top             =   2550
      Width           =   5415
   End
   Begin VB.Label lblLink 
      Alignment       =   2  'Center
      Caption         =   "http://e398essentials.wikispaces.com/P2KCommander"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   120
      TabIndex        =   3
      Top             =   2760
      Width           =   5415
   End
   Begin VB.Label Label3 
      Caption         =   $"frmWiz1.frx":000C
      Height          =   855
      Left            =   120
      TabIndex        =   2
      Top             =   1560
      Width           =   5535
   End
   Begin VB.Label Label2 
      Caption         =   $"frmWiz1.frx":00F9
      Height          =   495
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   5535
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "Step 1 - Open J2MEST file"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   1080
      Width           =   5535
   End
End
Attribute VB_Name = "frmWiz1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

' This entire work was written by Enrico Bertozzi (a.k.a. "thenext1" on LeaderGL forums)
' You can distribute, edit and recompile it, providing that you mention me on your work

' Questo codice è stato scritto da Enrico Bertozzi (conosciuto come "thenext1" sul forum di LeaderGL)
' Puoi distribuirlo, modificarlo e ricompilarlo, a patto che tu mi menzioni nel tuo codice/programma.

' Un grande grazie agli utenti del forum di
'       www.motofan.ru
' perchè anche se loro non lo sanno, ho preso qualche spunto dalle loro conversazioni :)

Private Sub cmdChoose_Click()

Dim fn As String
fn = fncGetFileNametoOpen("Open J2MEST")

If Len(fn) = 0 Then Exit Sub

Open fn For Binary As 1

' Controllo correttezza del file: dimensione: dev'essere 22072 byte
If LOF(1) <> 22072 Then
    MsgBox "The file you have chosen is damaged, corrupted or isn't the E1000's J2MEST file", vbCritical
    Close 1
    Exit Sub
End If

Get 1, , J2MEST
Close 1

frmWiz2.Show
Unload Me
End Sub

Private Sub Form_Load()
RfInternalMemory = True
End Sub

Private Sub lblLink_Click()
ShellExecute Me.hwnd, "open", lblLink.Caption, vbNullString, vbNullString, vbMaximizedFocus
End Sub

Private Sub Option1_Click()
RfInternalMemory = True
End Sub

Private Sub Option2_Click()
RfInternalMemory = False
End Sub
