VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "Msflxgrd.ocx"
Begin VB.Form frmListe 
   Appearance      =   0  'Flat
   AutoRedraw      =   -1  'True
   Caption         =   " FS Directory List"
   ClientHeight    =   7875
   ClientLeft      =   45
   ClientTop       =   345
   ClientWidth     =   10815
   BeginProperty Font 
      Name            =   "Arial"
      Size            =   9
      Charset         =   162
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H80000008&
   Icon            =   "frmList.frx":0000
   KeyPreview      =   -1  'True
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   7875
   ScaleWidth      =   10815
   Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
      Height          =   7410
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   10580
      _ExtentX        =   18653
      _ExtentY        =   13070
      _Version        =   393216
      Cols            =   7
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial"
         Size            =   9
         Charset         =   162
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
End
Attribute VB_Name = "frmListe"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim DX As Integer

Private Sub Form_Activate()
frmListe.Caption = " FS [ " + FS_CDIR + " ] Directory List"
Rem If Form4Top >= 0 Then
   Rem Me.Top = Form4Top
Rem End If
Rem If Form4Left >= 0 Then
   Rem Me.Left = Form4Left
Rem End If
MSFlexGrid1.Row = 0
MSFlexGrid1.Col = 0
MSFlexGrid1.Text = "File No."
MSFlexGrid1.Col = 1
MSFlexGrid1.Text = "File Name"
MSFlexGrid1.Col = 2
MSFlexGrid1.Text = "Type"
MSFlexGrid1.Col = 3
MSFlexGrid1.Text = "Attributes"
MSFlexGrid1.Col = 4
MSFlexGrid1.Text = "File Size   "
MSFlexGrid1.Col = 5
MSFlexGrid1.Text = "Date"
MSFlexGrid1.Col = 6
MSFlexGrid1.Text = "Time"

MSFlexGrid1.ColWidth(0) = Me.TextWidth("File No.") + 180
MSFlexGrid1.ColWidth(1) = Me.TextWidth("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
MSFlexGrid1.ColWidth(2) = Me.TextWidth("TYPE") + 100
MSFlexGrid1.ColWidth(3) = Me.TextWidth("rwxrwxrwx") + 100
MSFlexGrid1.ColWidth(4) = Me.TextWidth("999,999,999,999") + 100
MSFlexGrid1.ColWidth(5) = Me.TextWidth("99/99/9999/") + 50
MSFlexGrid1.ColWidth(6) = Me.TextWidth("99:99:99/") + 100

MSFlexGrid1.ColAlignment(0) = 0
MSFlexGrid1.ColAlignment(1) = 1
MSFlexGrid1.ColAlignment(2) = 5
MSFlexGrid1.ColAlignment(3) = 3
MSFlexGrid1.ColAlignment(4) = 6
MSFlexGrid1.ColAlignment(5) = 1
MSFlexGrid1.ColAlignment(6) = 1

MSFlexGrid1.Refresh
MSFlexGrid1.Col = 0
End Sub

Private Sub Form_DblClick()
Unload frmListe
End Sub

Private Sub Form_Load()
Left = (Screen.Width - Width) / 2
Top = (Screen.Height - Height) / 2
OpenFileNumber = 0
End Sub

Private Sub Form_Unload(Cancel As Integer)
Rem Form4Top = Me.Top
Rem Form4Left = Me.Left
End Sub

Private Sub Form_Deactivate()
Rem Form4Top = Me.Top
Rem Form4Left = Me.Left
End Sub

Private Sub MSFlexGrid1_Click()
If MSFlexGrid1.MouseRow = 0 Then
   If MSFlexGrid1.MouseCol = 0 Then
      MSFlexGrid1.Col = 0
      MSFlexGrid1.Sort = 3
   Else
      MSFlexGrid1.Sort = 5
      MSFlexGrid1.Col = 0
   End If
Else
   MSFlexGrid1.Col = 0
End If
MSFlexGrid1.ColSel = 6
End Sub

Private Sub MSFlexGrid1_DblClick()
DX = MSFlexGrid1.Row
Rem MSFlexGrid1.Col = 0
MSFlexGrid1.ColSel = 6
If DX > 0 Then
   MSFlexGrid1.Col = 2
   If MSFlexGrid1.Text = "File" Then
      MSFlexGrid1.Col = 0
      OpenFileNumber = MSFlexGrid1.Text
      Form1.Label1.Caption = "Open FS File FDT Number : " + CStr(OpenFileNumber)
      MousePointer = 11
      DX = Form1.OpenFile(ImageFileName, OpenFileNumber)
      MousePointer = 0
      Unload Me
   Else
      If MSFlexGrid1.Text = "DIR" Then
         Rem MsgBox ("The selected entry is a directory... Please select a file..."), 48, " Open a Singlix FS File"
         MSFlexGrid1.Col = 1
         MousePointer = 11
         DX = Form1.ChangeDirectory(ImageFileName, Trim$(MSFlexGrid1.Text))
         If DX > 0 Then Form1.Label1.Caption = "FS Directory : " + FS_CDIR
         MousePointer = 0
         Unload Me
      End If
   End If
End If
End Sub

Private Sub MSFlexGrid1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Or KeyAscii = 32 Then
   MSFlexGrid1.Col = 0
   MSFlexGrid1.ColSel = 6
   DX = MSFlexGrid1.Row
End If
End Sub
