home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 6_2008-2009.ISO / data / zips / VB_Decompi2142181302009.psc / frmExtractingData.frm < prev    next >
Text File  |  2009-01-09  |  14KB  |  427 lines

  1. VERSION 5.00
  2. Begin VB.Form frmExtractingData 
  3.    BackColor       =   &H00FFFFFF&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Extracting Data"
  6.    ClientHeight    =   7770
  7.    ClientLeft      =   45
  8.    ClientTop       =   435
  9.    ClientWidth     =   10230
  10.    Icon            =   "frmExtractingData.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   7770
  15.    ScaleWidth      =   10230
  16.    StartUpPosition =   2  'CenterScreen
  17.    Begin VB.PictureBox Picture1 
  18.       Appearance      =   0  'Flat
  19.       BackColor       =   &H00FFFFFF&
  20.       ForeColor       =   &H80000008&
  21.       Height          =   3615
  22.       Left            =   240
  23.       ScaleHeight     =   3585
  24.       ScaleWidth      =   9705
  25.       TabIndex        =   4
  26.       Top             =   240
  27.       Width           =   9735
  28.       Begin VB.Timer RefList 
  29.          Enabled         =   0   'False
  30.          Interval        =   2500
  31.          Left            =   3600
  32.          Top             =   1680
  33.       End
  34.       Begin VB.Timer TimerForExtract 
  35.          Enabled         =   0   'False
  36.          Interval        =   1
  37.          Left            =   4320
  38.          Top             =   1680
  39.       End
  40.       Begin VB.PictureBox LastImage 
  41.          Appearance      =   0  'Flat
  42.          BackColor       =   &H00FFFFFF&
  43.          ForeColor       =   &H80000008&
  44.          Height          =   1095
  45.          Left            =   240
  46.          Picture         =   "frmExtractingData.frx":08CA
  47.          ScaleHeight     =   1065
  48.          ScaleWidth      =   4545
  49.          TabIndex        =   17
  50.          Top             =   2160
  51.          Width           =   4575
  52.       End
  53.       Begin VB.TextBox LastSentence 
  54.          Appearance      =   0  'Flat
  55.          BackColor       =   &H00FFFFFF&
  56.          Height          =   1095
  57.          Left            =   4920
  58.          Locked          =   -1  'True
  59.          TabIndex        =   16
  60.          Top             =   2160
  61.          Width           =   4575
  62.       End
  63.       Begin VB.PictureBox LoadingExtAll 
  64.          Appearance      =   0  'Flat
  65.          BackColor       =   &H00E0E0E0&
  66.          ForeColor       =   &H80000008&
  67.          Height          =   375
  68.          Left            =   240
  69.          ScaleHeight     =   345
  70.          ScaleWidth      =   9225
  71.          TabIndex        =   14
  72.          Top             =   1320
  73.          Width           =   9255
  74.          Begin VB.PictureBox LoadingExtDone 
  75.             BackColor       =   &H000000FF&
  76.             BorderStyle     =   0  'None
  77.             Height          =   375
  78.             Left            =   0
  79.             ScaleHeight     =   375
  80.             ScaleWidth      =   375
  81.             TabIndex        =   15
  82.             Top             =   0
  83.             Width           =   375
  84.          End
  85.       End
  86.       Begin VB.PictureBox Picture3 
  87.          BackColor       =   &H00FFFFFF&
  88.          BorderStyle     =   0  'None
  89.          Enabled         =   0   'False
  90.          Height          =   375
  91.          Left            =   7800
  92.          Picture         =   "frmExtractingData.frx":09CC
  93.          ScaleHeight     =   375
  94.          ScaleWidth      =   1215
  95.          TabIndex        =   12
  96.          Top             =   680
  97.          Width           =   1215
  98.          Begin VB.Label Label5 
  99.             Alignment       =   2  'Center
  100.             BackStyle       =   0  'Transparent
  101.             Caption         =   "STOP"
  102.             BeginProperty Font 
  103.                Name            =   "MS Sans Serif"
  104.                Size            =   8.25
  105.                Charset         =   0
  106.                Weight          =   700
  107.                Underline       =   0   'False
  108.                Italic          =   0   'False
  109.                Strikethrough   =   0   'False
  110.             EndProperty
  111.             ForeColor       =   &H000000C0&
  112.             Height          =   255
  113.             Left            =   0
  114.             TabIndex        =   13
  115.             Top             =   60
  116.             Width           =   1095
  117.          End
  118.       End
  119.       Begin VB.PictureBox Picture2 
  120.          BackColor       =   &H00FFFFFF&
  121.          BorderStyle     =   0  'None
  122.          Height          =   375
  123.          Left            =   7800
  124.          Picture         =   "frmExtractingData.frx":1DA6
  125.          ScaleHeight     =   375
  126.          ScaleWidth      =   1215
  127.          TabIndex        =   10
  128.          Top             =   310
  129.          Width           =   1215
  130.          Begin VB.Label Label4 
  131.             Alignment       =   2  'Center
  132.             BackStyle       =   0  'Transparent
  133.             Caption         =   "GO"
  134.             BeginProperty Font 
  135.                Name            =   "MS Sans Serif"
  136.                Size            =   8.25
  137.                Charset         =   0
  138.                Weight          =   700
  139.                Underline       =   0   'False
  140.                Italic          =   0   'False
  141.                Strikethrough   =   0   'False
  142.             EndProperty
  143.             ForeColor       =   &H000000C0&
  144.             Height          =   255
  145.             Left            =   0
  146.             TabIndex        =   11
  147.             Top             =   60
  148.             Width           =   1095
  149.          End
  150.       End
  151.       Begin VB.TextBox TextMaxSentence 
  152.          Alignment       =   2  'Center
  153.          Appearance      =   0  'Flat
  154.          BackColor       =   &H00FFFFFF&
  155.          BeginProperty Font 
  156.             Name            =   "MS Sans Serif"
  157.             Size            =   8.25
  158.             Charset         =   0
  159.             Weight          =   700
  160.             Underline       =   0   'False
  161.             Italic          =   0   'False
  162.             Strikethrough   =   0   'False
  163.          EndProperty
  164.          ForeColor       =   &H000000C0&
  165.          Height          =   285
  166.          Left            =   3720
  167.          TabIndex        =   8
  168.          Text            =   "4"
  169.          Top             =   640
  170.          Width           =   615
  171.       End
  172.       Begin VB.CheckBox ChkSentences 
  173.          Appearance      =   0  'Flat
  174.          BackColor       =   &H00FFFFFF&
  175.          Caption         =   "Extract Sentences ( Text )"
  176.          BeginProperty Font 
  177.             Name            =   "MS Sans Serif"
  178.             Size            =   8.25
  179.             Charset         =   0
  180.             Weight          =   700
  181.             Underline       =   0   'False
  182.             Italic          =   0   'False
  183.             Strikethrough   =   0   'False
  184.          EndProperty
  185.          ForeColor       =   &H00800000&
  186.          Height          =   255
  187.          Left            =   360
  188.          TabIndex        =   6
  189.          Top             =   720
  190.          Value           =   1  'Checked
  191.          Width           =   2775
  192.       End
  193.       Begin VB.CheckBox ChkImages 
  194.          Appearance      =   0  'Flat
  195.          BackColor       =   &H00FFFFFF&
  196.          Caption         =   "Extract Images ( Bmp , Jpg )"
  197.          BeginProperty Font 
  198.             Name            =   "MS Sans Serif"
  199.             Size            =   8.25
  200.             Charset         =   0
  201.             Weight          =   700
  202.             Underline       =   0   'False
  203.             Italic          =   0   'False
  204.             Strikethrough   =   0   'False
  205.          EndProperty
  206.          ForeColor       =   &H00800000&
  207.          Height          =   255
  208.          Left            =   360
  209.          TabIndex        =   5
  210.          Top             =   360
  211.          Value           =   1  'Checked
  212.          Width           =   2775
  213.       End
  214.       Begin VB.Label Label1 
  215.          AutoSize        =   -1  'True
  216.          BackStyle       =   0  'Transparent
  217.          Caption         =   "Last Image"
  218.          BeginProperty Font 
  219.             Name            =   "MS Sans Serif"
  220.             Size            =   8.25
  221.             Charset         =   0
  222.             Weight          =   700
  223.             Underline       =   0   'False
  224.             Italic          =   0   'False
  225.             Strikethrough   =   0   'False
  226.          EndProperty
  227.          ForeColor       =   &H000000C0&
  228.          Height          =   195
  229.          Index           =   1
  230.          Left            =   360
  231.          TabIndex        =   19
  232.          Top             =   1920
  233.          Width           =   945
  234.       End
  235.       Begin VB.Label Label1 
  236.          AutoSize        =   -1  'True
  237.          BackStyle       =   0  'Transparent
  238.          Caption         =   "Last Sentence"
  239.          BeginProperty Font 
  240.             Name            =   "MS Sans Serif"
  241.             Size            =   8.25
  242.             Charset         =   0
  243.             Weight          =   700
  244.             Underline       =   0   'False
  245.             Italic          =   0   'False
  246.             Strikethrough   =   0   'False
  247.          EndProperty
  248.          ForeColor       =   &H000000C0&
  249.          Height          =   195
  250.          Index           =   2
  251.          Left            =   5040
  252.          TabIndex        =   18
  253.          Top             =   1920
  254.          Width           =   1245
  255.       End
  256.       Begin VB.Shape Shape3 
  257.          Height          =   855
  258.          Left            =   7200
  259.          Top             =   240
  260.          Width           =   2295
  261.       End
  262.       Begin VB.Label Label3 
  263.          AutoSize        =   -1  'True
  264.          BackStyle       =   0  'Transparent
  265.          Caption         =   "*selected length will be accepted"
  266.          ForeColor       =   &H00808080&
  267.          Height          =   195
  268.          Left            =   4440
  269.          TabIndex        =   9
  270.          Top             =   705
  271.          Width           =   2340
  272.       End
  273.       Begin VB.Shape Shape2 
  274.          Height          =   855
  275.          Left            =   3480
  276.          Top             =   240
  277.          Width           =   3495
  278.       End
  279.       Begin VB.Label Label2 
  280.          AutoSize        =   -1  'True
  281.          BackStyle       =   0  'Transparent
  282.          Caption         =   "Extracted Sentences Length  (Minium)"
  283.          BeginProperty Font 
  284.             Name            =   "MS Sans Serif"
  285.             Size            =   8.25
  286.             Charset         =   0
  287.             Weight          =   700
  288.             Underline       =   0   'False
  289.             Italic          =   0   'False
  290.             Strikethrough   =   0   'False
  291.          EndProperty
  292.          ForeColor       =   &H00800000&
  293.          Height          =   195
  294.          Left            =   3600
  295.          TabIndex        =   7
  296.          Top             =   360
  297.          Width           =   3255
  298.       End
  299.       Begin VB.Shape Shape1 
  300.          Height          =   855
  301.          Left            =   240
  302.          Top             =   240
  303.          Width           =   3015
  304.       End
  305.    End
  306.    Begin VB.FileListBox ExtractedFilesSentences 
  307.       Appearance      =   0  'Flat
  308.       BackColor       =   &H00FFFFFF&
  309.       Height          =   3345
  310.       Left            =   5160
  311.       Pattern         =   "*.Txt*"
  312.       TabIndex        =   2
  313.       Top             =   4200
  314.       Width           =   4815
  315.    End
  316.    Begin VB.FileListBox ExtractedFiles 
  317.       Appearance      =   0  'Flat
  318.       BackColor       =   &H00FFFFFF&
  319.       Height          =   3345
  320.       Left            =   240
  321.       Pattern         =   "*.bmp*;*.jpg*"
  322.       TabIndex        =   0
  323.       Top             =   4200
  324.       Width           =   4815
  325.    End
  326.    Begin VB.Label Label1 
  327.       AutoSize        =   -1  'True
  328.       BackStyle       =   0  'Transparent
  329.       Caption         =   "Extracted Sentences"
  330.       BeginProperty Font 
  331.          Name            =   "MS Sans Serif"
  332.          Size            =   8.25
  333.          Charset         =   0
  334.          Weight          =   700
  335.          Underline       =   0   'False
  336.          Italic          =   0   'False
  337.          Strikethrough   =   0   'False
  338.       EndProperty
  339.       ForeColor       =   &H000000C0&
  340.       Height          =   195
  341.       Index           =   3
  342.       Left            =   5280
  343.       TabIndex        =   3
  344.       Top             =   3960
  345.       Width           =   1785
  346.    End
  347.    Begin VB.Label Label1 
  348.       AutoSize        =   -1  'True
  349.       BackStyle       =   0  'Transparent
  350.       Caption         =   "Extracted Images"
  351.       BeginProperty Font 
  352.          Name            =   "MS Sans Serif"
  353.          Size            =   8.25
  354.          Charset         =   0
  355.          Weight          =   700
  356.          Underline       =   0   'False
  357.          Italic          =   0   'False
  358.          Strikethrough   =   0   'False
  359.       EndProperty
  360.       ForeColor       =   &H000000C0&
  361.       Height          =   195
  362.       Index           =   0
  363.       Left            =   360
  364.       TabIndex        =   1
  365.       Top             =   3960
  366.       Width           =   1485
  367.    End
  368. End
  369. Attribute VB_Name = "frmExtractingData"
  370. Attribute VB_GlobalNameSpace = False
  371. Attribute VB_Creatable = False
  372. Attribute VB_PredeclaredId = True
  373. Attribute VB_Exposed = False
  374. Private Sub Form_Load()
  375. Dim I As Integer
  376. ExtractedFiles.Path = App.Path + "\Temp\"
  377. ExtractedFilesSentences.Path = App.Path + "\Temp\"
  378. For I = 0 To ExtractedFiles.ListCount - 1
  379. Kill App.Path + "\Temp\" + ExtractedFiles.List(I)
  380. Next
  381. For I = 0 To ExtractedFilesSentences.ListCount - 1
  382. Kill App.Path + "\Temp\" + ExtractedFilesSentences.List(I)
  383. Next
  384. ExtractedFiles.Refresh
  385. ExtractedFilesSentences.Refresh
  386. LoadingExtDone.Width = 0
  387. End Sub
  388.  
  389. Private Sub Label4_Click()
  390. Picture2.Enabled = False
  391. Picture3.Enabled = True
  392. Open FileName For Binary As #1
  393. FilePos = 1
  394. MaxSentenceLong = Int(TextMaxSentence.Text) - 1
  395. TimerForExtract.Enabled = True
  396. RefList.Enabled = True
  397. End Sub
  398.  
  399. Private Sub Label5_Click()
  400. Close #1
  401. End
  402. End Sub
  403.  
  404. Private Sub RefList_Timer()
  405. ExtractedFilesSentences.Refresh
  406. ExtractedFiles.Refresh
  407. End Sub
  408.  
  409. Private Sub TextMaxSentence_Change()
  410. On Error GoTo Err:
  411. If Int(TextMaxSentence.Text) < 999 And Int(TextMaxSentence.Text) > 0 Then
  412. Exit Sub
  413. End If
  414. Err:
  415. TextMaxSentence.Text = "4"
  416. TextMaxSentence.SelStart = Len(TextMaxSentence.Text)
  417. End Sub
  418.  
  419. Private Sub TimerForExtract_Timer()
  420. Dim I As Integer
  421. For I = 0 To 5000
  422. Call ExtractNext
  423. Next
  424. LastSentence.Text = LastSavedSentence
  425. RefreshLoadingBar
  426. End Sub
  427.