home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 November / VPR9611A.ISO / vpr_data / vb32 / vb4wm / vb4-4.cab / picview.frm < prev    next >
Text File  |  1996-01-12  |  3KB  |  135 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "画像表示"
  4.    ClientHeight    =   4830
  5.    ClientLeft      =   1065
  6.    ClientTop       =   1695
  7.    ClientWidth     =   7395
  8.    ClipControls    =   0   'False
  9.    Height          =   5235
  10.    Left            =   1005
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4830
  13.    ScaleWidth      =   7395
  14.    Top             =   1350
  15.    Width           =   7515
  16. BeginProperty Font
  17. name = "標準ゴシック"
  18. size = 9
  19. bold = 0
  20. EndProperty
  21.    Begin VB.CommandButton Command1 
  22.       Caption         =   "終了(&X)"
  23.       Height          =   495
  24.       Left            =   5520
  25.       TabIndex        =   4
  26.       Top             =   4080
  27.       Width           =   1215
  28. BeginProperty Font
  29. name = "標準ゴシック"
  30. size = 9
  31. bold = 0 
  32. EndProperty
  33.    End
  34.    Begin VB.FileListBox File1 
  35.       Height          =   1320
  36.       Left            =   600
  37.       Pattern         =   "*.bmp;*.wmf;*.ico"
  38.       TabIndex        =   2
  39.       Top             =   2400
  40.       Width           =   2895
  41. BeginProperty Font
  42. name = "標準ゴシック"
  43. size = 9
  44. bold = 0 
  45. EndProperty
  46.    End
  47.    Begin VB.DirListBox Dir1 
  48.       Height          =   1575
  49.       Left            =   600
  50.       TabIndex        =   1
  51.       Top             =   720
  52.       Width           =   2895
  53. BeginProperty Font
  54. name = "標準ゴシック"
  55. size = 9
  56. bold = 0 
  57. EndProperty
  58.    End
  59.    Begin VB.DriveListBox Drive1 
  60.       Height          =   1530
  61.       Left            =   600
  62.       TabIndex        =   0
  63.       Top             =   360
  64.       Width           =   2895
  65. BeginProperty Font
  66. name = "標準ゴシック"
  67. size = 9
  68. bold = 0 
  69. EndProperty
  70.    End
  71.    Begin VB.Label Label1 
  72.       BorderStyle     =   1  '実線
  73.       Height          =   495
  74.       Left            =   3720
  75.       TabIndex        =   3
  76.       Top             =   3255
  77.       Width           =   3015
  78. BeginProperty Font
  79. name = "標準ゴシック"
  80. size = 9
  81. bold = 0 
  82. EndProperty
  83.    End
  84.    Begin VB.Image Open 
  85.       BorderStyle     =   1  '実線
  86.       Height          =   2775
  87.       Left            =   3720
  88.       Stretch         =   -1  'True
  89.       Top             =   360
  90.       Width           =   3015
  91.    End
  92. End
  93. Attribute VB_Name = "Form1"
  94. Attribute VB_Creatable = False
  95. Attribute VB_Exposed = False
  96.  
  97. Private Sub Command1_Click()
  98.     Unload Me
  99.     End
  100. End Sub
  101.  
  102. Private Sub Dir1_Change()
  103.     ' ディレクトリが変更された場合に、ファイル リスト ボックスの表示を更新します。
  104.     file1.Path = Dir1.Path
  105. End Sub
  106.  
  107. Private Sub Drive1_Change()
  108.     ' ドライブが変更された場合に、ディレクトリ リスト ボックスの表示を更新します。
  109.     ' (これにより、ディレクトリ リスト ボックスの Dir1_Change イベントが発生します。)
  110.     Dir1.Path = Drive1.Drive
  111. End Sub
  112.  
  113. Private Sub File1_DblClick()
  114.     ' ルート ディレクトリの場合 (たとえば C:\) には、
  115.     ' Path プロパティの末尾に円記号 (\) が付きます。
  116.     ' ルート以外の階層では、末尾に円記号が付きません。
  117.     ' いずれの場合にも、選択されたファイルのパスとファイル名
  118.     ' が完全なものになるよう、次のコードで処理します。
  119.     If Right(file1.Path, 1) <> "\" Then
  120.         label1.Caption = file1.Path & "\" & file1.filename
  121.     Else
  122.         label1.Caption = file1.Path & file1.filename
  123.     End If
  124.         ' 選択されたピクチャ ファイルをロードします。
  125.         Form1.open.picture = LoadPicture(label1.Caption)
  126. End Sub
  127.  
  128. Private Sub Form_Load()
  129.     ' コントロールのドライブとパスを、このアプリケーションが存在する
  130.     ' ドライブとパスに設定します。
  131.     Drive1.Drive = App.Path
  132.     Dir1.Path = App.Path
  133. End Sub
  134.  
  135.