home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 February / VPR9602A.ISO / fwindows / exds100 / spack / exceedv2.frm < prev    next >
Text File  |  1995-09-29  |  12KB  |  361 lines

  1. VERSION 2.00
  2. Begin Form Purg 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "ファイル列で結合 動作試験 Ver 1.00 "
  5.    FontBold        =   0   'False
  6.    FontItalic      =   0   'False
  7.    FontName        =   "MS ゴシック"
  8.    FontSize        =   12.75
  9.    FontStrikethru  =   0   'False
  10.    FontUnderline   =   0   'False
  11.    Height          =   3810
  12.    Icon            =   EXCEEDV2.FRX:0000
  13.    Left            =   2550
  14.    LinkTopic       =   "Form2"
  15.    ScaleHeight     =   3360
  16.    ScaleWidth      =   6945
  17.    Top             =   6855
  18.    Width           =   7065
  19.    Begin CommandButton command1 
  20.       Caption         =   "解説"
  21.       FontBold        =   -1  'True
  22.       FontItalic      =   0   'False
  23.       FontName        =   "MS ゴシック"
  24.       FontSize        =   12.75
  25.       FontStrikethru  =   0   'False
  26.       FontUnderline   =   0   'False
  27.       Height          =   525
  28.       Index           =   6
  29.       Left            =   3450
  30.       TabIndex        =   14
  31.       Top             =   2580
  32.       Width           =   1035
  33.    End
  34.    Begin TextBox Text2 
  35.       BackColor       =   &H0000FFFF&
  36.       FontBold        =   0   'False
  37.       FontItalic      =   0   'False
  38.       FontName        =   "MS ゴシック"
  39.       FontSize        =   12.75
  40.       FontStrikethru  =   0   'False
  41.       FontUnderline   =   0   'False
  42.       Height          =   435
  43.       Index           =   3
  44.       Left            =   1920
  45.       TabIndex        =   11
  46.       Text            =   "0"
  47.       Top             =   690
  48.       Width           =   855
  49.    End
  50.    Begin CommandButton command1 
  51.       Caption         =   "制限"
  52.       FontBold        =   -1  'True
  53.       FontItalic      =   0   'False
  54.       FontName        =   "MS ゴシック"
  55.       FontSize        =   12.75
  56.       FontStrikethru  =   0   'False
  57.       FontUnderline   =   0   'False
  58.       Height          =   525
  59.       Index           =   5
  60.       Left            =   2460
  61.       TabIndex        =   10
  62.       Top             =   2580
  63.       Width           =   1005
  64.    End
  65.    Begin CommandButton command1 
  66.       Caption         =   "閲覧"
  67.       FontBold        =   0   'False
  68.       FontItalic      =   0   'False
  69.       FontName        =   "MS ゴシック"
  70.       FontSize        =   12.75
  71.       FontStrikethru  =   0   'False
  72.       FontUnderline   =   0   'False
  73.       Height          =   465
  74.       Index           =   4
  75.       Left            =   5700
  76.       TabIndex        =   9
  77.       Top             =   1260
  78.       Width           =   855
  79.    End
  80.    Begin CommandButton command1 
  81.       Caption         =   "閲覧"
  82.       FontBold        =   0   'False
  83.       FontItalic      =   0   'False
  84.       FontName        =   "MS ゴシック"
  85.       FontSize        =   12.75
  86.       FontStrikethru  =   0   'False
  87.       FontUnderline   =   0   'False
  88.       Height          =   465
  89.       Index           =   2
  90.       Left            =   5700
  91.       TabIndex        =   8
  92.       Top             =   180
  93.       Width           =   855
  94.    End
  95.    Begin TextBox Text2 
  96.       BackColor       =   &H0000FFFF&
  97.       FontBold        =   0   'False
  98.       FontItalic      =   0   'False
  99.       FontName        =   "MS ゴシック"
  100.       FontSize        =   12.75
  101.       FontStrikethru  =   0   'False
  102.       FontUnderline   =   0   'False
  103.       Height          =   435
  104.       Index           =   2
  105.       Left            =   1920
  106.       TabIndex        =   5
  107.       Text            =   "out.txt"
  108.       Top             =   1260
  109.       Width           =   3705
  110.    End
  111.    Begin TextBox Text2 
  112.       BackColor       =   &H0000FFFF&
  113.       FontBold        =   0   'False
  114.       FontItalic      =   0   'False
  115.       FontName        =   "MS ゴシック"
  116.       FontSize        =   12.75
  117.       FontStrikethru  =   0   'False
  118.       FontUnderline   =   0   'False
  119.       Height          =   435
  120.       Index           =   0
  121.       Left            =   1920
  122.       TabIndex        =   3
  123.       Text            =   "data5.txt"
  124.       Top             =   180
  125.       Width           =   3705
  126.    End
  127.    Begin CommandButton command1 
  128.       Caption         =   "終了"
  129.       FontBold        =   -1  'True
  130.       FontItalic      =   0   'False
  131.       FontName        =   "MS ゴシック"
  132.       FontSize        =   12.75
  133.       FontStrikethru  =   0   'False
  134.       FontUnderline   =   0   'False
  135.       Height          =   525
  136.       Index           =   1
  137.       Left            =   5490
  138.       TabIndex        =   2
  139.       Top             =   2580
  140.       Width           =   975
  141.    End
  142.    Begin CommandButton command1 
  143.       Caption         =   "実行"
  144.       FontBold        =   -1  'True
  145.       FontItalic      =   0   'False
  146.       FontName        =   "MS ゴシック"
  147.       FontSize        =   12.75
  148.       FontStrikethru  =   0   'False
  149.       FontUnderline   =   0   'False
  150.       Height          =   525
  151.       Index           =   0
  152.       Left            =   4470
  153.       TabIndex        =   0
  154.       Top             =   2580
  155.       Width           =   1035
  156.    End
  157.    Begin Label Label5 
  158.       Alignment       =   1  '右揃え
  159.       BackStyle       =   0  '透明
  160.       Caption         =   "0~"
  161.       FontBold        =   0   'False
  162.       FontItalic      =   0   'False
  163.       FontName        =   "MS ゴシック"
  164.       FontSize        =   9.75
  165.       FontStrikethru  =   0   'False
  166.       FontUnderline   =   0   'False
  167.       Height          =   255
  168.       Left            =   1260
  169.       TabIndex        =   15
  170.       Top             =   1020
  171.       Width           =   465
  172.    End
  173.    Begin Label Label4 
  174.       BackStyle       =   0  '透明
  175.       BorderStyle     =   1  '実線
  176.       Caption         =   "黄色のエリアにはファイル名などをもれなく設定して下さい"
  177.       FontBold        =   0   'False
  178.       FontItalic      =   0   'False
  179.       FontName        =   "MS ゴシック"
  180.       FontSize        =   10.5
  181.       FontStrikethru  =   0   'False
  182.       FontUnderline   =   0   'False
  183.       ForeColor       =   &H000000FF&
  184.       Height          =   735
  185.       Left            =   330
  186.       TabIndex        =   13
  187.       Top             =   2340
  188.       Width           =   1995
  189.    End
  190.    Begin Label Label2 
  191.       Alignment       =   1  '右揃え
  192.       BackStyle       =   0  '透明
  193.       Caption         =   "レコード番号"
  194.       FontBold        =   0   'False
  195.       FontItalic      =   0   'False
  196.       FontName        =   "MS ゴシック"
  197.       FontSize        =   12.75
  198.       FontStrikethru  =   0   'False
  199.       FontUnderline   =   0   'False
  200.       Height          =   375
  201.       Index           =   3
  202.       Left            =   270
  203.       TabIndex        =   12
  204.       Top             =   750
  205.       Width           =   1575
  206.    End
  207.    Begin Label Label3 
  208.       Alignment       =   1  '右揃え
  209.       BackStyle       =   0  '透明
  210.       Caption         =   "返却値"
  211.       FontBold        =   0   'False
  212.       FontItalic      =   0   'False
  213.       FontName        =   "MS ゴシック"
  214.       FontSize        =   12.75
  215.       FontStrikethru  =   0   'False
  216.       FontUnderline   =   0   'False
  217.       ForeColor       =   &H00FF0000&
  218.       Height          =   345
  219.       Left            =   4020
  220.       TabIndex        =   7
  221.       Top             =   1950
  222.       Width           =   855
  223.    End
  224.    Begin Label Label2 
  225.       Alignment       =   1  '右揃え
  226.       BackStyle       =   0  '透明
  227.       Caption         =   "出力ファイル"
  228.       FontBold        =   0   'False
  229.       FontItalic      =   0   'False
  230.       FontName        =   "MS ゴシック"
  231.       FontSize        =   12.75
  232.       FontStrikethru  =   0   'False
  233.       FontUnderline   =   0   'False
  234.       Height          =   375
  235.       Index           =   2
  236.       Left            =   300
  237.       TabIndex        =   6
  238.       Top             =   1290
  239.       Width           =   1575
  240.    End
  241.    Begin Label Label2 
  242.       Alignment       =   1  '右揃え
  243.       BackStyle       =   0  '透明
  244.       Caption         =   "ファイル1"
  245.       FontBold        =   0   'False
  246.       FontItalic      =   0   'False
  247.       FontName        =   "MS ゴシック"
  248.       FontSize        =   12.75
  249.       FontStrikethru  =   0   'False
  250.       FontUnderline   =   0   'False
  251.       Height          =   375
  252.       Index           =   0
  253.       Left            =   240
  254.       TabIndex        =   4
  255.       Top             =   240
  256.       Width           =   1635
  257.    End
  258.    Begin Label Label1 
  259.       BackColor       =   &H0000FF00&
  260.       BorderStyle     =   1  '実線
  261.       FontBold        =   0   'False
  262.       FontItalic      =   0   'False
  263.       FontName        =   "MS ゴシック"
  264.       FontSize        =   12.75
  265.       FontStrikethru  =   0   'False
  266.       FontUnderline   =   0   'False
  267.       Height          =   495
  268.       Left            =   4920
  269.       TabIndex        =   1
  270.       Top             =   1860
  271.       Width           =   705
  272.    End
  273. End
  274. Option Explicit
  275.  
  276. Dim DELM As Integer
  277.  
  278. Sub command1_Click (INDEX As Integer)
  279. Dim ret
  280. Dim sFile As String
  281. Dim fFile As String
  282. Dim dam   As String
  283. Dim cSet  As Integer
  284. Dim num   As String
  285. Dim t
  286. Dim ccc As String
  287.  
  288.   ccc = Chr$(13)
  289.   sFile = text2(0).Text
  290.   fFile = text2(2).Text
  291.   dam = text2(3).Text
  292.  
  293.   Select Case INDEX
  294.   Case 0                                '実行
  295.     If Len(Trim$(dam)) <= 0 Then
  296.       MsgBox "レコード番号が指定されていません.", 48, "設定エラー"
  297.       Exit Sub
  298.     End If
  299.     cSet = Val(Trim$(dam))
  300.     If Len(Trim$(sFile)) > 0 Then
  301.       If Len(Trim$(fFile)) > 0 Then
  302.         screen.MousePointer = 11
  303.         ret = Purge%(sFile, fFile, cSet)
  304.         Label1.Caption = Str$(ret)
  305.         screen.MousePointer = 1
  306.         Exit Sub
  307.       End If
  308.     End If
  309.     MsgBox "ファイル名が指定されていません.", 48, "設定エラー"
  310.     Exit Sub
  311.   Case 1                                '終了
  312.     Unload Me
  313.   Case 2                                '閲覧
  314.     t = Shell("notepad.exe " + sFile, 1)
  315.   Case 4                                '閲覧
  316.     t = Shell("notepad.exe " + fFile, 1)
  317.   Case 6                                '解説
  318.     dam = ""
  319.     dam = dam + "<機能概要>  Purge" + ccc + ccc
  320.     dam = dam + " 可変長テキストファイルにおいて、指定のレコードを削除し、" + ccc
  321.     dam = dam + " 削除後のファイルを作成します。" + ccc
  322.     dam = dam + " " + ccc
  323.     dam = dam + "<VBでの呼び出し方法>" + ccc + ccc
  324.     dam = dam + " ①定義方法はVBプログラムソースのEXCEEDF.BASを参照して下さい。" + ccc
  325.     dam = dam + " ②引数について" + ccc
  326.     dam = dam + "    Purge%( P1 , P2 , P3 )" + ccc
  327.     dam = dam + "   P1:参照ファイル名称" + ccc
  328.     dam = dam + "   P2:削除結果ファイル名称(1レコードの内容を1カラムとします。)" + ccc
  329.     dam = dam + "   P3:削除レコード番号(0オリジン)" + ccc + ccc
  330.     dam = dam + "<返却値> " + ccc + ccc
  331.     dam = dam + "    0:エラー n:削除成功" + ccc
  332.     dam = dam + ccc
  333.     dam = dam + " メールはLDI04643へどうぞ" + ccc
  334.     dam = dam + "                     (C) EXCEED CORP. 1995 "
  335.     MsgBox dam, 64, Version
  336.   Case 5                                '制限
  337.     dam = ""
  338.     dam = dam + "<制限事項>" + ccc + ccc
  339.     dam = dam + " (1)ファイル1は1レコード以上のデータを持つこと" + ccc
  340.     dam = dam + " (2)参照ファイルのレコード数と指定レコード番号が32767を越えないこと" + ccc
  341.     dam = dam + " (4)ファイル1は何れもテキスト形式であり1レコードの区切りが改行であること" + ccc
  342.     dam = dam + " (5)ファイル1、ファイル2及び出力ファイルの名称は異なっていること" + ccc + ccc
  343.     dam = dam + "以上の点を制限として考えておりますが、何か問題がありましたらメールにてご連絡下さい" + ccc
  344.     dam = dam + ccc
  345.     dam = dam + " メールはLDI04643へどうぞ" + ccc
  346.     dam = dam + "                     (C) EXCEED CORP. 1995 "
  347.     MsgBox dam, 64, Version
  348.   End Select
  349. End Sub
  350.  
  351. Sub Form_Load ()
  352. Dim i
  353.   i = FileMain.CMD(0).Tag
  354.   Caption = FileMain.CMD(i).Caption + " (" + FileMain.Label1(i).Caption + ")"
  355.   DELM = 0
  356.   text2(3).Text = "0"
  357. top = 200
  358. left = 200
  359. End Sub
  360.  
  361.