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

  1. VERSION 2.00
  2. Begin Form CutC 
  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          =   4650
  12.    Icon            =   EXCEEDV3.FRX:0000
  13.    Left            =   7770
  14.    LinkTopic       =   "Form2"
  15.    ScaleHeight     =   4200
  16.    ScaleWidth      =   7035
  17.    Top             =   1485
  18.    Width           =   7155
  19.    Begin OptionButton OPT 
  20.       BackColor       =   &H00C0C0C0&
  21.       Caption         =   "タブ"
  22.       FontBold        =   0   'False
  23.       FontItalic      =   0   'False
  24.       FontName        =   "MS ゴシック"
  25.       FontSize        =   12.75
  26.       FontStrikethru  =   0   'False
  27.       FontUnderline   =   0   'False
  28.       Height          =   375
  29.       Index           =   3
  30.       Left            =   1920
  31.       TabIndex        =   18
  32.       Top             =   2760
  33.       Width           =   1455
  34.    End
  35.    Begin OptionButton OPT 
  36.       BackColor       =   &H00C0C0C0&
  37.       Caption         =   "ブランク"
  38.       FontBold        =   0   'False
  39.       FontItalic      =   0   'False
  40.       FontName        =   "MS ゴシック"
  41.       FontSize        =   12.75
  42.       FontStrikethru  =   0   'False
  43.       FontUnderline   =   0   'False
  44.       Height          =   375
  45.       Index           =   2
  46.       Left            =   1920
  47.       TabIndex        =   17
  48.       Top             =   2430
  49.       Width           =   1455
  50.    End
  51.    Begin OptionButton OPT 
  52.       BackColor       =   &H00C0C0C0&
  53.       Caption         =   "カンマ"
  54.       FontBold        =   0   'False
  55.       FontItalic      =   0   'False
  56.       FontName        =   "MS ゴシック"
  57.       FontSize        =   12.75
  58.       FontStrikethru  =   0   'False
  59.       FontUnderline   =   0   'False
  60.       Height          =   375
  61.       Index           =   1
  62.       Left            =   1920
  63.       TabIndex        =   16
  64.       Top             =   2100
  65.       Value           =   -1  'True
  66.       Width           =   1455
  67.    End
  68.    Begin CommandButton command1 
  69.       Caption         =   "解説"
  70.       FontBold        =   -1  'True
  71.       FontItalic      =   0   'False
  72.       FontName        =   "MS ゴシック"
  73.       FontSize        =   12.75
  74.       FontStrikethru  =   0   'False
  75.       FontUnderline   =   0   'False
  76.       Height          =   525
  77.       Index           =   6
  78.       Left            =   3360
  79.       TabIndex        =   14
  80.       Top             =   3450
  81.       Width           =   1035
  82.    End
  83.    Begin TextBox Text2 
  84.       BackColor       =   &H0000FFFF&
  85.       FontBold        =   0   'False
  86.       FontItalic      =   0   'False
  87.       FontName        =   "MS ゴシック"
  88.       FontSize        =   12.75
  89.       FontStrikethru  =   0   'False
  90.       FontUnderline   =   0   'False
  91.       Height          =   435
  92.       Index           =   3
  93.       Left            =   1920
  94.       TabIndex        =   11
  95.       Text            =   "1"
  96.       Top             =   1230
  97.       Width           =   855
  98.    End
  99.    Begin CommandButton command1 
  100.       Caption         =   "制限"
  101.       FontBold        =   -1  'True
  102.       FontItalic      =   0   'False
  103.       FontName        =   "MS ゴシック"
  104.       FontSize        =   12.75
  105.       FontStrikethru  =   0   'False
  106.       FontUnderline   =   0   'False
  107.       Height          =   525
  108.       Index           =   5
  109.       Left            =   2370
  110.       TabIndex        =   10
  111.       Top             =   3450
  112.       Width           =   1005
  113.    End
  114.    Begin CommandButton command1 
  115.       Caption         =   "閲覧"
  116.       FontBold        =   0   'False
  117.       FontItalic      =   0   'False
  118.       FontName        =   "MS ゴシック"
  119.       FontSize        =   12.75
  120.       FontStrikethru  =   0   'False
  121.       FontUnderline   =   0   'False
  122.       Height          =   465
  123.       Index           =   4
  124.       Left            =   5700
  125.       TabIndex        =   9
  126.       Top             =   690
  127.       Width           =   855
  128.    End
  129.    Begin CommandButton command1 
  130.       Caption         =   "閲覧"
  131.       FontBold        =   0   'False
  132.       FontItalic      =   0   'False
  133.       FontName        =   "MS ゴシック"
  134.       FontSize        =   12.75
  135.       FontStrikethru  =   0   'False
  136.       FontUnderline   =   0   'False
  137.       Height          =   465
  138.       Index           =   2
  139.       Left            =   5700
  140.       TabIndex        =   8
  141.       Top             =   150
  142.       Width           =   855
  143.    End
  144.    Begin TextBox Text2 
  145.       BackColor       =   &H0000FFFF&
  146.       FontBold        =   0   'False
  147.       FontItalic      =   0   'False
  148.       FontName        =   "MS ゴシック"
  149.       FontSize        =   12.75
  150.       FontStrikethru  =   0   'False
  151.       FontUnderline   =   0   'False
  152.       Height          =   435
  153.       Index           =   2
  154.       Left            =   1920
  155.       TabIndex        =   5
  156.       Text            =   "out.txt"
  157.       Top             =   690
  158.       Width           =   3705
  159.    End
  160.    Begin TextBox Text2 
  161.       BackColor       =   &H0000FFFF&
  162.       FontBold        =   0   'False
  163.       FontItalic      =   0   'False
  164.       FontName        =   "MS ゴシック"
  165.       FontSize        =   12.75
  166.       FontStrikethru  =   0   'False
  167.       FontUnderline   =   0   'False
  168.       Height          =   435
  169.       Index           =   0
  170.       Left            =   1920
  171.       TabIndex        =   3
  172.       Text            =   "data7.txt"
  173.       Top             =   180
  174.       Width           =   3705
  175.    End
  176.    Begin CommandButton command1 
  177.       Caption         =   "終了"
  178.       FontBold        =   -1  'True
  179.       FontItalic      =   0   'False
  180.       FontName        =   "MS ゴシック"
  181.       FontSize        =   12.75
  182.       FontStrikethru  =   0   'False
  183.       FontUnderline   =   0   'False
  184.       Height          =   525
  185.       Index           =   1
  186.       Left            =   5400
  187.       TabIndex        =   2
  188.       Top             =   3450
  189.       Width           =   975
  190.    End
  191.    Begin CommandButton command1 
  192.       Caption         =   "実行"
  193.       FontBold        =   -1  'True
  194.       FontItalic      =   0   'False
  195.       FontName        =   "MS ゴシック"
  196.       FontSize        =   12.75
  197.       FontStrikethru  =   0   'False
  198.       FontUnderline   =   0   'False
  199.       Height          =   525
  200.       Index           =   0
  201.       Left            =   4380
  202.       TabIndex        =   0
  203.       Top             =   3450
  204.       Width           =   1035
  205.    End
  206.    Begin Label Label5 
  207.       Alignment       =   1  '右揃え
  208.       BackStyle       =   0  '透明
  209.       Caption         =   "(カラム位置)"
  210.       FontBold        =   0   'False
  211.       FontItalic      =   0   'False
  212.       FontName        =   "MS ゴシック"
  213.       FontSize        =   9.75
  214.       FontStrikethru  =   0   'False
  215.       FontUnderline   =   0   'False
  216.       Height          =   255
  217.       Left            =   690
  218.       TabIndex        =   19
  219.       Top             =   1530
  220.       Width           =   1095
  221.    End
  222.    Begin Label Label2 
  223.       Alignment       =   1  '右揃え
  224.       BackStyle       =   0  '透明
  225.       Caption         =   "デリミタ"
  226.       FontBold        =   0   'False
  227.       FontItalic      =   0   'False
  228.       FontName        =   "MS ゴシック"
  229.       FontSize        =   12.75
  230.       FontStrikethru  =   0   'False
  231.       FontUnderline   =   0   'False
  232.       Height          =   375
  233.       Index           =   4
  234.       Left            =   930
  235.       TabIndex        =   15
  236.       Top             =   2190
  237.       Width           =   825
  238.    End
  239.    Begin Label Label4 
  240.       BackStyle       =   0  '透明
  241.       BorderStyle     =   1  '実線
  242.       Caption         =   "黄色のエリアにはファイル名などをもれなく設定して下さい"
  243.       FontBold        =   0   'False
  244.       FontItalic      =   0   'False
  245.       FontName        =   "MS ゴシック"
  246.       FontSize        =   10.5
  247.       FontStrikethru  =   0   'False
  248.       FontUnderline   =   0   'False
  249.       ForeColor       =   &H000000FF&
  250.       Height          =   735
  251.       Left            =   240
  252.       TabIndex        =   13
  253.       Top             =   3210
  254.       Width           =   1995
  255.    End
  256.    Begin Label Label2 
  257.       Alignment       =   1  '右揃え
  258.       BackStyle       =   0  '透明
  259.       Caption         =   "削除指定位置"
  260.       FontBold        =   0   'False
  261.       FontItalic      =   0   'False
  262.       FontName        =   "MS ゴシック"
  263.       FontSize        =   12.75
  264.       FontStrikethru  =   0   'False
  265.       FontUnderline   =   0   'False
  266.       Height          =   375
  267.       Index           =   3
  268.       Left            =   270
  269.       TabIndex        =   12
  270.       Top             =   1290
  271.       Width           =   1575
  272.    End
  273.    Begin Label Label3 
  274.       Alignment       =   1  '右揃え
  275.       BackStyle       =   0  '透明
  276.       Caption         =   "返却値"
  277.       FontBold        =   0   'False
  278.       FontItalic      =   0   'False
  279.       FontName        =   "MS ゴシック"
  280.       FontSize        =   12.75
  281.       FontStrikethru  =   0   'False
  282.       FontUnderline   =   0   'False
  283.       ForeColor       =   &H00FF0000&
  284.       Height          =   345
  285.       Left            =   4050
  286.       TabIndex        =   7
  287.       Top             =   1680
  288.       Width           =   855
  289.    End
  290.    Begin Label Label2 
  291.       Alignment       =   1  '右揃え
  292.       BackStyle       =   0  '透明
  293.       Caption         =   "出力ファイル"
  294.       FontBold        =   0   'False
  295.       FontItalic      =   0   'False
  296.       FontName        =   "MS ゴシック"
  297.       FontSize        =   12.75
  298.       FontStrikethru  =   0   'False
  299.       FontUnderline   =   0   'False
  300.       Height          =   375
  301.       Index           =   2
  302.       Left            =   300
  303.       TabIndex        =   6
  304.       Top             =   720
  305.       Width           =   1575
  306.    End
  307.    Begin Label Label2 
  308.       Alignment       =   1  '右揃え
  309.       BackStyle       =   0  '透明
  310.       Caption         =   "ファイル1"
  311.       FontBold        =   0   'False
  312.       FontItalic      =   0   'False
  313.       FontName        =   "MS ゴシック"
  314.       FontSize        =   12.75
  315.       FontStrikethru  =   0   'False
  316.       FontUnderline   =   0   'False
  317.       Height          =   375
  318.       Index           =   0
  319.       Left            =   240
  320.       TabIndex        =   4
  321.       Top             =   240
  322.       Width           =   1635
  323.    End
  324.    Begin Label Label1 
  325.       BackColor       =   &H0000FF00&
  326.       BorderStyle     =   1  '実線
  327.       FontBold        =   0   'False
  328.       FontItalic      =   0   'False
  329.       FontName        =   "MS ゴシック"
  330.       FontSize        =   12.75
  331.       FontStrikethru  =   0   'False
  332.       FontUnderline   =   0   'False
  333.       Height          =   495
  334.       Left            =   4950
  335.       TabIndex        =   1
  336.       Top             =   1590
  337.       Width           =   705
  338.    End
  339. End
  340. Option Explicit
  341.  
  342. Dim DELM As Integer
  343.  
  344. Sub Command1_Click (INDEX As Integer)
  345. Dim ret
  346. Dim sFile As String
  347. Dim fFile As String
  348. Dim cSet  As Integer
  349. Dim num   As String
  350. Dim dam   As String
  351. Dim t
  352. Dim ccc As String
  353.  
  354.   ccc = Chr$(13)
  355.   sFile = text2(0).Text
  356.   fFile = text2(2).Text
  357.   num = text2(3).Text
  358.  
  359.   Select Case INDEX
  360.   Case 0                                '実行
  361.     If Len(Trim$(num)) <= 0 Then
  362.       MsgBox "削除する位置(カラム)が指定されていません.", 48, "設定エラー"
  363.       Exit Sub
  364.     End If
  365.     cSet = Val(Trim$(num))
  366.     If Len(Trim$(sFile)) > 0 Then
  367.       If Len(Trim$(fFile)) > 0 Then
  368.         screen.MousePointer = 11
  369.         ret = CutColFiles(sFile, fFile, cSet, DELM)
  370.         Label1.Caption = Str$(ret)
  371.         screen.MousePointer = 1
  372.         Exit Sub
  373.       End If
  374.     End If
  375.     MsgBox "ファイル名が指定されていません.", 48, "設定エラー"
  376.     Exit Sub
  377.   Case 1                                '終了
  378.     Unload Me
  379.   Case 2                                '閲覧
  380.     t = Shell("notepad.exe " + sFile, 1)
  381.   Case 4                                '閲覧
  382.     t = Shell("notepad.exe " + fFile, 1)
  383.   Case 6                                '解説
  384.     dam = ""
  385.     dam = dam + "<機能概要>  CutColFiles" + ccc + ccc
  386.     dam = dam + " 列データを削除します。(列はカンマかブランクで区切られていること)" + ccc
  387.     dam = dam + " " + ccc
  388.     dam = dam + "<VBでの呼び出し方法>" + ccc + ccc
  389.     dam = dam + " ①定義方法はVBプログラムソースのEXCEEDF.BASを参照して下さい。" + ccc
  390.     dam = dam + " ②引数について" + ccc + ccc
  391.     dam = dam + "    CutColFiles%( P1 , P2 , P3 , P4 )" + ccc
  392.     dam = dam + "   P1:ファイル名称" + ccc
  393.     dam = dam + "   P2:削除後の出力ファイル名称(新規に作成されます。)" + ccc
  394.     dam = dam + "   P3:どのカラム列を削除するかを指定します。(1以上を指定)" + ccc
  395.     dam = dam + "     データのみを削除しますのでデリミタは残ります。" + ccc
  396.     dam = dam + "     指定値が列数を越えている場合は後ろにデリミタが追加される場合があります。" + ccc
  397.     dam = dam + "   P4:1,カンマ 2,ブランク 3,タブ を指定します。" + ccc + ccc
  398.     dam = dam + "<返却値> 0:エラー n:正常" + ccc + ccc
  399.     dam = dam + ccc
  400.     dam = dam + " メールはLDI04643へどうぞ" + ccc
  401.     dam = dam + "                     (C) EXCEED CORP. 1995 "
  402.     MsgBox dam, 64, version
  403.   Case 5                                '制限
  404.     dam = ""
  405.     dam = dam + "<制限事項>" + ccc + ccc
  406.     dam = dam + " (1)ファイル1は1レコード以上のデータを持つこと" + ccc
  407.     dam = dam + " (2)扱うファイルのレコード数が32767を越えないこと" + ccc
  408.     dam = dam + " (3)ファイル1はテキスト形式であり1レコードの区切りが改行であること" + ccc
  409.     dam = dam + " (4)ファイル1,出力ファイル名は異なっていること" + ccc + ccc
  410.     dam = dam + "以上の点を制限として考えておりますが、何か問題がありましたらメールにてご連絡下さい" + ccc
  411.     dam = dam + ccc
  412.     dam = dam + " メールはLDI04643へどうぞ" + ccc
  413.     dam = dam + "                     (C) EXCEED CORP. 1995 "
  414.     MsgBox dam, 64, version
  415.   End Select
  416. End Sub
  417.  
  418. Sub Form_Load ()
  419. Dim i
  420.   i = FileMain.CMD(0).Tag
  421.   Caption = FileMain.CMD(i).Caption + " (" + FileMain.Label1(i).Caption + ")"
  422.   DELM = 1
  423.   text2(3).Text = "1"
  424. top = 200
  425. left = 200
  426.  
  427. End Sub
  428.  
  429. Sub OPT_Click (INDEX As Integer)
  430.   If OPT(INDEX).Value Then
  431.     DELM = INDEX
  432.   End If
  433. End Sub
  434.  
  435.