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

  1. VERSION 2.00
  2. Begin Form Edits 
  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          =   4305
  12.    Icon            =   EXCEEDV7.FRX:0000
  13.    Left            =   2100
  14.    LinkTopic       =   "Form2"
  15.    ScaleHeight     =   3855
  16.    ScaleWidth      =   6855
  17.    Top             =   6195
  18.    Width           =   6975
  19.    Begin TextBox Text2 
  20.       BackColor       =   &H0000FFFF&
  21.       FontBold        =   0   'False
  22.       FontItalic      =   0   'False
  23.       FontName        =   "MS ゴシック"
  24.       FontSize        =   12.75
  25.       FontStrikethru  =   0   'False
  26.       FontUnderline   =   0   'False
  27.       Height          =   435
  28.       Index           =   3
  29.       Left            =   1920
  30.       TabIndex        =   15
  31.       Text            =   "<置換>"
  32.       Top             =   1740
  33.       Width           =   3705
  34.    End
  35.    Begin CommandButton command1 
  36.       Caption         =   "解説"
  37.       FontBold        =   -1  'True
  38.       FontItalic      =   0   'False
  39.       FontName        =   "MS ゴシック"
  40.       FontSize        =   12.75
  41.       FontStrikethru  =   0   'False
  42.       FontUnderline   =   0   'False
  43.       Height          =   525
  44.       Index           =   6
  45.       Left            =   3420
  46.       TabIndex        =   14
  47.       Top             =   3030
  48.       Width           =   1035
  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            =   2430
  61.       TabIndex        =   12
  62.       Top             =   3030
  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        =   11
  77.       Top             =   660
  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        =   10
  92.       Top             =   150
  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        =   7
  107.       Text            =   "out.txt"
  108.       Top             =   660
  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           =   1
  121.       Left            =   1920
  122.       TabIndex        =   5
  123.       Text            =   "99"
  124.       Top             =   1260
  125.       Width           =   3705
  126.    End
  127.    Begin TextBox Text2 
  128.       BackColor       =   &H0000FFFF&
  129.       FontBold        =   0   'False
  130.       FontItalic      =   0   'False
  131.       FontName        =   "MS ゴシック"
  132.       FontSize        =   12.75
  133.       FontStrikethru  =   0   'False
  134.       FontUnderline   =   0   'False
  135.       Height          =   435
  136.       Index           =   0
  137.       Left            =   1920
  138.       TabIndex        =   3
  139.       Text            =   "data11.txt"
  140.       Top             =   180
  141.       Width           =   3705
  142.    End
  143.    Begin CommandButton command1 
  144.       Caption         =   "終了"
  145.       FontBold        =   -1  'True
  146.       FontItalic      =   0   'False
  147.       FontName        =   "MS ゴシック"
  148.       FontSize        =   12.75
  149.       FontStrikethru  =   0   'False
  150.       FontUnderline   =   0   'False
  151.       Height          =   525
  152.       Index           =   1
  153.       Left            =   5460
  154.       TabIndex        =   2
  155.       Top             =   3030
  156.       Width           =   975
  157.    End
  158.    Begin CommandButton command1 
  159.       Caption         =   "実行"
  160.       FontBold        =   -1  'True
  161.       FontItalic      =   0   'False
  162.       FontName        =   "MS ゴシック"
  163.       FontSize        =   12.75
  164.       FontStrikethru  =   0   'False
  165.       FontUnderline   =   0   'False
  166.       Height          =   525
  167.       Index           =   0
  168.       Left            =   4440
  169.       TabIndex        =   0
  170.       Top             =   3030
  171.       Width           =   1035
  172.    End
  173.    Begin Label Label2 
  174.       Alignment       =   1  '右揃え
  175.       BackStyle       =   0  '透明
  176.       Caption         =   "置換文字列"
  177.       FontBold        =   0   'False
  178.       FontItalic      =   0   'False
  179.       FontName        =   "MS ゴシック"
  180.       FontSize        =   12.75
  181.       FontStrikethru  =   0   'False
  182.       FontUnderline   =   0   'False
  183.       Height          =   375
  184.       Index           =   3
  185.       Left            =   300
  186.       TabIndex        =   16
  187.       Top             =   1800
  188.       Width           =   1575
  189.    End
  190.    Begin Label Label4 
  191.       BackStyle       =   0  '透明
  192.       BorderStyle     =   1  '実線
  193.       Caption         =   "黄色のエリアにはファイル名などをもれなく設定して下さい"
  194.       FontBold        =   0   'False
  195.       FontItalic      =   0   'False
  196.       FontName        =   "MS ゴシック"
  197.       FontSize        =   10.5
  198.       FontStrikethru  =   0   'False
  199.       FontUnderline   =   0   'False
  200.       ForeColor       =   &H000000FF&
  201.       Height          =   735
  202.       Left            =   300
  203.       TabIndex        =   13
  204.       Top             =   2790
  205.       Width           =   1995
  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        =   9
  221.       Top             =   2400
  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        =   8
  238.       Top             =   690
  239.       Width           =   1575
  240.    End
  241.    Begin Label Label2 
  242.       Alignment       =   1  '右揃え
  243.       BackStyle       =   0  '透明
  244.       Caption         =   "検索文字列"
  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           =   1
  253.       Left            =   300
  254.       TabIndex        =   6
  255.       Top             =   1320
  256.       Width           =   1575
  257.    End
  258.    Begin Label Label2 
  259.       Alignment       =   1  '右揃え
  260.       BackStyle       =   0  '透明
  261.       Caption         =   "ファイル1"
  262.       FontBold        =   0   'False
  263.       FontItalic      =   0   'False
  264.       FontName        =   "MS ゴシック"
  265.       FontSize        =   12.75
  266.       FontStrikethru  =   0   'False
  267.       FontUnderline   =   0   'False
  268.       Height          =   375
  269.       Index           =   0
  270.       Left            =   240
  271.       TabIndex        =   4
  272.       Top             =   240
  273.       Width           =   1635
  274.    End
  275.    Begin Label Label1 
  276.       BackColor       =   &H0000FF00&
  277.       BorderStyle     =   1  '実線
  278.       FontBold        =   0   'False
  279.       FontItalic      =   0   'False
  280.       FontName        =   "MS ゴシック"
  281.       FontSize        =   12.75
  282.       FontStrikethru  =   0   'False
  283.       FontUnderline   =   0   'False
  284.       Height          =   495
  285.       Left            =   4920
  286.       TabIndex        =   1
  287.       Top             =   2310
  288.       Width           =   705
  289.    End
  290. End
  291. Option Explicit
  292.  
  293. Dim DELM As Integer
  294.  
  295. Sub Command1_Click (INDEX As Integer)
  296. Dim ret
  297. Dim sFile As String
  298. Dim fFile As String
  299. Dim expr1 As String
  300. Dim expr2 As String
  301. Dim dam   As String
  302. Dim t
  303. Dim ccc As String
  304.  
  305.   ccc = Chr$(13)
  306.   sFile = text2(0).Text
  307.   fFile = text2(2).Text
  308.   expr1 = text2(1).Text
  309.   expr2 = text2(3).Text
  310.  
  311.   Select Case INDEX
  312.   Case 0                                '実行
  313.     If Len(Trim$(sFile)) > 0 Then
  314.       If Len(Trim$(fFile)) > 0 Then
  315.         screen.MousePointer = 11
  316.         ret = EditFiles%(sFile, fFile, expr1, expr2)
  317.         Label1.Caption = Str$(ret)
  318.         screen.MousePointer = 1
  319.         Exit Sub
  320.       End If
  321.     End If
  322.     MsgBox "ファイル名が指定されていません.", 48, "設定エラー"
  323.     Exit Sub
  324.   Case 1                                '終了
  325.     Unload Me
  326.   Case 2                                '閲覧
  327.     t = Shell("notepad.exe " + sFile, 1)
  328.   Case 4                                '閲覧
  329.     t = Shell("notepad.exe " + fFile, 1)
  330.   Case 6                                '解説
  331.     dam = ""
  332.     dam = dam + "<機能概要>  EditFiles" + ccc
  333.     dam = dam + " テキストファイルを検索して検索文字列を置換文字列で置き換えます。" + ccc
  334.     dam = dam + " 結果はファイルに出力されます。" + ccc
  335.     dam = dam + " " + ccc
  336.     dam = dam + " " + ccc
  337.     dam = dam + "<VBでの呼び出し方法>" + ccc + ccc
  338.     dam = dam + " ①定義方法はVBプログラムソースのEXCEEDF.BASを参照して下さい。" + ccc
  339.     dam = dam + " ②引数について" + ccc
  340.     dam = dam + "    EditFiles%( P1 , P2 , P3 )" + ccc
  341.     dam = dam + "   P1:編集ファイル名称" + ccc
  342.     dam = dam + "   P2:編集結果のファイル名称(新規に作成されます。)" + ccc
  343.     dam = dam + "   P3:検索文字列" + ccc
  344.     dam = dam + "   P4:置換文字列" + ccc + ccc
  345.     dam = dam + "<返却値> -1:エラー n:置換数" + ccc + ccc
  346.     dam = dam + ccc
  347.     dam = dam + " メールはLDI04643へどうぞ" + ccc
  348.     dam = dam + "                     (C) EXCEED CORP. 1995 "
  349.     MsgBox dam, 64, version
  350.   Case 5                                '制限
  351.     dam = ""
  352.     dam = dam + "<制限事項>" + ccc + ccc
  353.     dam = dam + " (1)ファイル1は1レコード以上のデータを持つこと" + ccc
  354.     dam = dam + " (2)ファイル1と編集結果のレコード長が最大1024を越えないこと" + ccc
  355.     dam = dam + " (3)編集結果のレコード数が32767を越えないこと" + ccc
  356.     dam = dam + " (4)ファイル1はテキスト形式であり1レコードの区切りが改行であること" + ccc
  357.     dam = dam + " (5)ファイル1、出力ファイル名は異なっていること" + ccc + ccc
  358.     dam = dam + "以上の点を制限として考えておりますが、何か問題がありましたらメールにてご連絡下さい" + ccc
  359.     dam = dam + ccc
  360.     dam = dam + " メールはLDI04643へどうぞ" + ccc
  361.     dam = dam + "                     (C) EXCEED CORP. 1995 "
  362.     MsgBox dam, 64, version
  363.   End Select
  364. End Sub
  365.  
  366. Sub Form_Load ()
  367. Dim i
  368.   i = FileMain.CMD(0).Tag
  369.   Caption = FileMain.CMD(i).Caption + " (" + FileMain.Label1(i).Caption + ")"
  370.   DELM = 0
  371. top = 200
  372. left = 200
  373. End Sub
  374.  
  375.