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

  1. VERSION 2.00
  2. Begin Form Dext 
  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          =   4335
  12.    Icon            =   EXCEEDV4.FRX:0000
  13.    Left            =   1095
  14.    LinkTopic       =   "Form2"
  15.    ScaleHeight     =   3885
  16.    ScaleWidth      =   6990
  17.    Top             =   1170
  18.    Width           =   7110
  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            =   1950
  30.       TabIndex        =   17
  31.       Text            =   "1"
  32.       Top             =   1200
  33.       Width           =   855
  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           =   3
  46.       Left            =   1890
  47.       TabIndex        =   16
  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           =   2
  62.       Left            =   1890
  63.       TabIndex        =   15
  64.       Top             =   2100
  65.       Width           =   1455
  66.    End
  67.    Begin OptionButton OPT 
  68.       BackColor       =   &H00C0C0C0&
  69.       Caption         =   "カンマ"
  70.       FontBold        =   0   'False
  71.       FontItalic      =   0   'False
  72.       FontName        =   "MS ゴシック"
  73.       FontSize        =   12.75
  74.       FontStrikethru  =   0   'False
  75.       FontUnderline   =   0   'False
  76.       Height          =   375
  77.       Index           =   1
  78.       Left            =   1890
  79.       TabIndex        =   14
  80.       Top             =   1770
  81.       Value           =   -1  'True
  82.       Width           =   1455
  83.    End
  84.    Begin CommandButton command1 
  85.       Caption         =   "解説"
  86.       FontBold        =   -1  'True
  87.       FontItalic      =   0   'False
  88.       FontName        =   "MS ゴシック"
  89.       FontSize        =   12.75
  90.       FontStrikethru  =   0   'False
  91.       FontUnderline   =   0   'False
  92.       Height          =   525
  93.       Index           =   6
  94.       Left            =   3360
  95.       TabIndex        =   12
  96.       Top             =   3120
  97.       Width           =   1035
  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             =   3120
  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            =   "data8.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             =   3120
  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             =   3120
  204.       Width           =   1035
  205.    End
  206.    Begin Label Label2 
  207.       Alignment       =   1  '右揃え
  208.       BackStyle       =   0  '透明
  209.       Caption         =   "CUT指定位置"
  210.       FontBold        =   0   'False
  211.       FontItalic      =   0   'False
  212.       FontName        =   "MS ゴシック"
  213.       FontSize        =   12.75
  214.       FontStrikethru  =   0   'False
  215.       FontUnderline   =   0   'False
  216.       Height          =   375
  217.       Index           =   3
  218.       Left            =   270
  219.       TabIndex        =   19
  220.       Top             =   1260
  221.       Width           =   1575
  222.    End
  223.    Begin Label Label5 
  224.       Alignment       =   1  '右揃え
  225.       BackStyle       =   0  '透明
  226.       Caption         =   "(カラム位置)"
  227.       FontBold        =   0   'False
  228.       FontItalic      =   0   'False
  229.       FontName        =   "MS ゴシック"
  230.       FontSize        =   9.75
  231.       FontStrikethru  =   0   'False
  232.       FontUnderline   =   0   'False
  233.       Height          =   255
  234.       Left            =   690
  235.       TabIndex        =   18
  236.       Top             =   1500
  237.       Width           =   1095
  238.    End
  239.    Begin Label Label2 
  240.       Alignment       =   1  '右揃え
  241.       BackStyle       =   0  '透明
  242.       Caption         =   "デリミタ"
  243.       FontBold        =   0   'False
  244.       FontItalic      =   0   'False
  245.       FontName        =   "MS ゴシック"
  246.       FontSize        =   12.75
  247.       FontStrikethru  =   0   'False
  248.       FontUnderline   =   0   'False
  249.       Height          =   375
  250.       Index           =   4
  251.       Left            =   900
  252.       TabIndex        =   13
  253.       Top             =   1860
  254.       Width           =   825
  255.    End
  256.    Begin Label Label4 
  257.       BackStyle       =   0  '透明
  258.       BorderStyle     =   1  '実線
  259.       Caption         =   "黄色のエリアにはファイル名などをもれなく設定して下さい"
  260.       FontBold        =   0   'False
  261.       FontItalic      =   0   'False
  262.       FontName        =   "MS ゴシック"
  263.       FontSize        =   10.5
  264.       FontStrikethru  =   0   'False
  265.       FontUnderline   =   0   'False
  266.       ForeColor       =   &H000000FF&
  267.       Height          =   735
  268.       Left            =   240
  269.       TabIndex        =   11
  270.       Top             =   2880
  271.       Width           =   1995
  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            =   3990
  286.       TabIndex        =   7
  287.       Top             =   1440
  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            =   4890
  335.       TabIndex        =   1
  336.       Top             =   1350
  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 oSet  As Integer
  349. Dim dam   As String
  350. Dim t
  351. Dim ccc As String
  352.  
  353.   ccc = Chr$(13)
  354.   sFile = text2(0).Text
  355.   fFile = text2(2).Text
  356.   dam = text2(3).Text
  357.  
  358.   Select Case INDEX
  359.   Case 0                                '実行
  360.     If Len(Trim$(dam)) <= 0 Then
  361.       MsgBox "CUT位置が指定されていません.", 48, "設定エラー"
  362.       Exit Sub
  363.     End If
  364.     oSet = Val(Trim$(dam))
  365.     If Len(Trim$(sFile)) > 0 Then
  366.       If Len(Trim$(fFile)) > 0 Then
  367.         screen.MousePointer = 11
  368.         ret = Dextract%(sFile, fFile, oSet, DELM)
  369.         Label1.Caption = Str$(ret)
  370.         screen.MousePointer = 1
  371.         Exit Sub
  372.       End If
  373.     End If
  374.     MsgBox "ファイル名が指定されていません.", 48, "設定エラー"
  375.     Exit Sub
  376.   Case 1                                '終了
  377.     Unload Me
  378.   Case 2                                '閲覧
  379.     t = Shell("notepad.exe " + sFile, 1)
  380.   Case 4                                '閲覧
  381.     t = Shell("notepad.exe " + fFile, 1)
  382.   Case 6                                '解説
  383.     dam = ""
  384.     dam = dam + "<機能概要>  Dextract" + ccc + ccc
  385.     dam = dam + " テキストファイルの指定列のデータを削除し、その削除(クリップ)されたデータを" + ccc
  386.     dam = dam + " ファイルに出力します。" + ccc
  387.     dam = dam + " 元ファイルの内容は削除後の状態に修正されてしまいます。" + ccc
  388.     dam = dam + " 指定列が列数を越えている場合はクリップデータがない状態で作成されます。" + ccc + ccc
  389.     dam = dam + "<VBでの呼び出し方法>" + ccc + ccc
  390.     dam = dam + " ①定義方法はVBプログラムソースのEXCEEDF.BASを参照して下さい。" + ccc
  391.     dam = dam + " ②引数について" + ccc + ccc
  392.     dam = dam + "    Dextract%( P1 , P2 , P3 , P4 )" + ccc
  393.     dam = dam + "   P1:対象ファイル名称" + ccc
  394.     dam = dam + "   P2:cutデータの収納のファイル名称(新規に作成されます。)" + ccc
  395.     dam = dam + "   P3:cutするカラム位置を指定します。(カラム番号は1オリジン)" + ccc
  396.     dam = dam + "   P4:1,カンマ 2,ブランク 3,タブ を指定します。" + ccc + ccc
  397.     dam = dam + "<返却値> 0:エラー n:正常" + ccc + ccc
  398.     dam = dam + ccc
  399.     dam = dam + " メールはLDI04643へどうぞ" + ccc
  400.     dam = dam + "                     (C) EXCEED CORP. 1995 "
  401.     MsgBox dam, 64, version
  402.   Case 5                                '制限
  403.     dam = ""
  404.     dam = dam + "<制限事項>" + ccc + ccc
  405.     dam = dam + " (1)ファイル1には1レコード以上のデータを持つこと" + ccc
  406.     dam = dam + " (2)ファイル1のレコード長は最大1024を越えないこと" + ccc
  407.     dam = dam + " (3)cut結果のレコード数が32767を越えないこと" + ccc
  408.     dam = dam + " (4)ファイル1はテキスト形式であり1レコードの区切りが改行であること" + ccc
  409.     dam = dam + " (5)ファイル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. top = 200
  424. left = 200
  425. End Sub
  426.  
  427. Sub OPT_Click (INDEX As Integer)
  428.   If OPT(INDEX).Value Then
  429.     DELM = INDEX
  430.   End If
  431. End Sub
  432.  
  433.