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

  1. VERSION 2.00
  2. Begin Form Rnam 
  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          =   3420
  12.    Icon            =   EXCEEDV1.FRX:0000
  13.    Left            =   300
  14.    LinkTopic       =   "Form2"
  15.    ScaleHeight     =   2970
  16.    ScaleWidth      =   7035
  17.    Top             =   2895
  18.    Width           =   7155
  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            =   3390
  30.       TabIndex        =   12
  31.       Top             =   2070
  32.       Width           =   1035
  33.    End
  34.    Begin CommandButton command1 
  35.       Caption         =   "制限"
  36.       FontBold        =   -1  'True
  37.       FontItalic      =   0   'False
  38.       FontName        =   "MS ゴシック"
  39.       FontSize        =   12.75
  40.       FontStrikethru  =   0   'False
  41.       FontUnderline   =   0   'False
  42.       Height          =   525
  43.       Index           =   5
  44.       Left            =   2400
  45.       TabIndex        =   10
  46.       Top             =   2070
  47.       Width           =   1005
  48.    End
  49.    Begin CommandButton command1 
  50.       Caption         =   "閲覧"
  51.       FontBold        =   0   'False
  52.       FontItalic      =   0   'False
  53.       FontName        =   "MS ゴシック"
  54.       FontSize        =   12.75
  55.       FontStrikethru  =   0   'False
  56.       FontUnderline   =   0   'False
  57.       Height          =   465
  58.       Index           =   3
  59.       Left            =   5700
  60.       TabIndex        =   9
  61.       Top             =   690
  62.       Width           =   855
  63.    End
  64.    Begin CommandButton command1 
  65.       Caption         =   "閲覧"
  66.       FontBold        =   0   'False
  67.       FontItalic      =   0   'False
  68.       FontName        =   "MS ゴシック"
  69.       FontSize        =   12.75
  70.       FontStrikethru  =   0   'False
  71.       FontUnderline   =   0   'False
  72.       Height          =   465
  73.       Index           =   2
  74.       Left            =   5700
  75.       TabIndex        =   8
  76.       Top             =   150
  77.       Width           =   855
  78.    End
  79.    Begin TextBox Text2 
  80.       BackColor       =   &H0000FFFF&
  81.       FontBold        =   0   'False
  82.       FontItalic      =   0   'False
  83.       FontName        =   "MS ゴシック"
  84.       FontSize        =   12.75
  85.       FontStrikethru  =   0   'False
  86.       FontUnderline   =   0   'False
  87.       Height          =   435
  88.       Index           =   1
  89.       Left            =   1920
  90.       TabIndex        =   5
  91.       Text            =   "data4.txt"
  92.       Top             =   720
  93.       Width           =   3705
  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           =   0
  105.       Left            =   1920
  106.       TabIndex        =   3
  107.       Text            =   "data3.txt"
  108.       Top             =   180
  109.       Width           =   3705
  110.    End
  111.    Begin CommandButton command1 
  112.       Caption         =   "終了"
  113.       FontBold        =   -1  'True
  114.       FontItalic      =   0   'False
  115.       FontName        =   "MS ゴシック"
  116.       FontSize        =   12.75
  117.       FontStrikethru  =   0   'False
  118.       FontUnderline   =   0   'False
  119.       Height          =   525
  120.       Index           =   1
  121.       Left            =   5430
  122.       TabIndex        =   2
  123.       Top             =   2070
  124.       Width           =   975
  125.    End
  126.    Begin CommandButton command1 
  127.       Caption         =   "実行"
  128.       FontBold        =   -1  'True
  129.       FontItalic      =   0   'False
  130.       FontName        =   "MS ゴシック"
  131.       FontSize        =   12.75
  132.       FontStrikethru  =   0   'False
  133.       FontUnderline   =   0   'False
  134.       Height          =   525
  135.       Index           =   0
  136.       Left            =   4410
  137.       TabIndex        =   0
  138.       Top             =   2070
  139.       Width           =   1035
  140.    End
  141.    Begin Label Label4 
  142.       BackStyle       =   0  '透明
  143.       BorderStyle     =   1  '実線
  144.       Caption         =   "黄色のエリアにはファイル名などをもれなく設定して下さい"
  145.       FontBold        =   0   'False
  146.       FontItalic      =   0   'False
  147.       FontName        =   "MS ゴシック"
  148.       FontSize        =   10.5
  149.       FontStrikethru  =   0   'False
  150.       FontUnderline   =   0   'False
  151.       ForeColor       =   &H000000FF&
  152.       Height          =   735
  153.       Left            =   270
  154.       TabIndex        =   11
  155.       Top             =   1830
  156.       Width           =   1995
  157.    End
  158.    Begin Label Label3 
  159.       Alignment       =   1  '右揃え
  160.       BackStyle       =   0  '透明
  161.       Caption         =   "返却値"
  162.       FontBold        =   0   'False
  163.       FontItalic      =   0   'False
  164.       FontName        =   "MS ゴシック"
  165.       FontSize        =   12.75
  166.       FontStrikethru  =   0   'False
  167.       FontUnderline   =   0   'False
  168.       ForeColor       =   &H00FF0000&
  169.       Height          =   345
  170.       Left            =   3990
  171.       TabIndex        =   7
  172.       Top             =   1410
  173.       Width           =   855
  174.    End
  175.    Begin Label Label2 
  176.       Alignment       =   1  '右揃え
  177.       BackStyle       =   0  '透明
  178.       Caption         =   "ファイル2"
  179.       FontBold        =   0   'False
  180.       FontItalic      =   0   'False
  181.       FontName        =   "MS ゴシック"
  182.       FontSize        =   12.75
  183.       FontStrikethru  =   0   'False
  184.       FontUnderline   =   0   'False
  185.       Height          =   375
  186.       Index           =   1
  187.       Left            =   300
  188.       TabIndex        =   6
  189.       Top             =   780
  190.       Width           =   1575
  191.    End
  192.    Begin Label Label2 
  193.       Alignment       =   1  '右揃え
  194.       BackStyle       =   0  '透明
  195.       Caption         =   "ファイル1"
  196.       FontBold        =   0   'False
  197.       FontItalic      =   0   'False
  198.       FontName        =   "MS ゴシック"
  199.       FontSize        =   12.75
  200.       FontStrikethru  =   0   'False
  201.       FontUnderline   =   0   'False
  202.       Height          =   375
  203.       Index           =   0
  204.       Left            =   240
  205.       TabIndex        =   4
  206.       Top             =   240
  207.       Width           =   1635
  208.    End
  209.    Begin Label Label1 
  210.       BackColor       =   &H0000FF00&
  211.       BorderStyle     =   1  '実線
  212.       FontBold        =   0   'False
  213.       FontItalic      =   0   'False
  214.       FontName        =   "MS ゴシック"
  215.       FontSize        =   12.75
  216.       FontStrikethru  =   0   'False
  217.       FontUnderline   =   0   'False
  218.       Height          =   495
  219.       Left            =   4890
  220.       TabIndex        =   1
  221.       Top             =   1320
  222.       Width           =   705
  223.    End
  224. End
  225. Option Explicit
  226.  
  227. Dim DELM As Integer
  228.  
  229. Sub Command1_Click (Index As Integer)
  230. Dim ret
  231. Dim sFile As String
  232. Dim eFile As String
  233. Dim dam   As String
  234. Dim num   As String
  235. Dim t
  236. Dim ccc As String
  237.  
  238.   ccc = Chr$(13)
  239.   sFile = text2(0).Text
  240.   eFile = text2(1).Text
  241.  
  242.  
  243.   Select Case Index
  244.   Case 0                                '実行
  245.     If Len(Trim$(sFile)) > 0 Then
  246.       If Len(Trim$(eFile)) > 0 Then
  247.           screen.MousePointer = 11
  248.           ret = RenameFiles%(sFile, eFile)
  249.           Label1.Caption = Str$(ret)
  250.           screen.MousePointer = 1
  251.           Exit Sub
  252.       End If
  253.     End If
  254.     MsgBox "ファイル名が指定されていません.", 48, "設定エラー"
  255.     Exit Sub
  256.   Case 1                                '終了
  257.     Unload Me
  258.   Case 2                                '閲覧
  259.     t = Shell("notepad.exe " + sFile, 1)
  260.   Case 3                                '閲覧
  261.     t = Shell("notepad.exe " + eFile, 1)
  262.   Case 6                                '解説
  263.     dam = ""
  264.     dam = dam + "<機能概要>   RenameFiles" + ccc + ccc
  265.     dam = dam + " ファイル名の名称を変更します。" + ccc
  266.     dam = dam + " C関数 _unlink と rename の組み合わせた関数です。" + ccc
  267.     dam = dam + " " + ccc
  268.     dam = dam + "<VBでの呼び出し方法>" + ccc + ccc
  269.     dam = dam + " ①定義方法はVBプログラムソースのEXCEEDF.BASを参照して下さい。" + ccc
  270.     dam = dam + " ②引数について" + ccc
  271.     dam = dam + "    RenameFiles%( P1 , P2 )" + ccc
  272.     dam = dam + "   P1:変更前のファイル名称" + ccc
  273.     dam = dam + "   P2:変更後のファイル名称" + ccc + ccc
  274.     dam = dam + "<返却値>" + ccc + ccc
  275.     dam = dam + "     0:正常  n:エラー" + ccc + ccc
  276.     dam = dam + "<補足> " + ccc + ccc
  277.     dam = dam + "    変更名称が既に存在している場合はUNLINKしてからRENAMEをかけているので" + ccc
  278.     dam = dam + "    たとえ、旧名称の指定が誤っていて、エラーを返してきた場合でも、変更先" + ccc
  279.     dam = dam + "    の名称のファイルは消えてしまいますので注意して下さい。" + ccc
  280.     dam = dam + ccc
  281.     dam = dam + " メールはLDI04643へどうぞ" + ccc
  282.     dam = dam + "                     (C) EXCEED CORP. 1995 "
  283.     MsgBox dam, 64, version
  284.   Case 5                                '制限
  285.     dam = ""
  286.     dam = dam + "<制限事項>" + ccc + ccc
  287.     dam = dam + " (1)ロングファイル名称はサポートしていません。" + ccc + ccc
  288.     dam = dam + "以上の点を制限として考えておりますが、何か問題がありましたらメールにてご連絡下さい" + ccc
  289.     dam = dam + ccc
  290.     dam = dam + " メールはLDI04643へどうぞ" + ccc
  291.     dam = dam + "                     (C) EXCEED CORP. 1995 "
  292.     MsgBox dam, 64, version
  293.   End Select
  294. End Sub
  295.  
  296. Sub Form_Load ()
  297. Dim i
  298.   i = FileMain.CMD(0).Tag
  299.   Caption = FileMain.CMD(i).Caption + " (" + FileMain.Label1(i).Caption + ")"
  300.   DELM = 1       'カンマ
  301. top = 200
  302. left = 200
  303. End Sub
  304.  
  305.