home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / iconview / iconview.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-08  |  5.3 KB  |  170 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Icon Viewer"
  4.    ClientHeight    =   2700
  5.    ClientLeft      =   1425
  6.    ClientTop       =   1890
  7.    ClientWidth     =   5910
  8.    Height          =   3390
  9.    Icon            =   ICONVIEW.FRX:0000
  10.    Left            =   1365
  11.    LinkMode        =   1  'Source
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    ScaleHeight     =   2700
  15.    ScaleWidth      =   5910
  16.    Top             =   1260
  17.    Width           =   6030
  18.    Begin DriveListBox Drive1 
  19.       FontBold        =   -1  'True
  20.       FontItalic      =   0   'False
  21.       FontName        =   "System"
  22.       FontSize        =   9.75
  23.       FontStrikethru  =   0   'False
  24.       FontUnderline   =   0   'False
  25.       Height          =   360
  26.       Left            =   1950
  27.       TabIndex        =   2
  28.       Top             =   2100
  29.       Width           =   2055
  30.    End
  31.    Begin CommandButton Command3 
  32.       Caption         =   "Quit"
  33.       FontBold        =   -1  'True
  34.       FontItalic      =   0   'False
  35.       FontName        =   "System"
  36.       FontSize        =   9.75
  37.       FontStrikethru  =   0   'False
  38.       FontUnderline   =   0   'False
  39.       Height          =   375
  40.       Left            =   4350
  41.       TabIndex        =   6
  42.       Top             =   1950
  43.       Width           =   1365
  44.    End
  45.    Begin CommandButton Command1 
  46.       Caption         =   "Copy Name"
  47.       FontBold        =   -1  'True
  48.       FontItalic      =   0   'False
  49.       FontName        =   "System"
  50.       FontSize        =   9.75
  51.       FontStrikethru  =   0   'False
  52.       FontUnderline   =   0   'False
  53.       Height          =   375
  54.       Left            =   4350
  55.       TabIndex        =   5
  56.       Top             =   1350
  57.       Width           =   1365
  58.    End
  59.    Begin DirListBox Dir1 
  60.       FontBold        =   -1  'True
  61.       FontItalic      =   0   'False
  62.       FontName        =   "System"
  63.       FontSize        =   9.75
  64.       FontStrikethru  =   0   'False
  65.       FontUnderline   =   0   'False
  66.       Height          =   1215
  67.       Left            =   1950
  68.       TabIndex        =   3
  69.       Top             =   750
  70.       Width           =   2055
  71.    End
  72.    Begin FileListBox File1 
  73.       FontBold        =   -1  'True
  74.       FontItalic      =   0   'False
  75.       FontName        =   "System"
  76.       FontSize        =   9.75
  77.       FontStrikethru  =   0   'False
  78.       FontUnderline   =   0   'False
  79.       Height          =   1710
  80.       Left            =   120
  81.       TabIndex        =   4
  82.       Top             =   720
  83.       Width           =   1755
  84.    End
  85.    Begin PictureBox Picture1 
  86.       BorderStyle     =   0  'None
  87.       Height          =   555
  88.       Left            =   120
  89.       ScaleHeight     =   555
  90.       ScaleWidth      =   555
  91.       TabIndex        =   1
  92.       Top             =   120
  93.       Width           =   555
  94.    End
  95.    Begin Label Label1 
  96.       FontBold        =   -1  'True
  97.       FontItalic      =   0   'False
  98.       FontName        =   "System"
  99.       FontSize        =   9.75
  100.       FontStrikethru  =   0   'False
  101.       FontUnderline   =   0   'False
  102.       Height          =   255
  103.       Left            =   870
  104.       TabIndex        =   0
  105.       Top             =   240
  106.       Width           =   4065
  107.    End
  108.    Begin Menu AboutMenu 
  109.       Caption         =   "About"
  110.    End
  111.    Begin Menu HelpMenu 
  112.       Caption         =   "Help"
  113.    End
  114. Sub AboutMenu_Click ()
  115.     Msg$ = "An Icon Viewing Utility written in Visual Basic" + Chr$(13) + Chr$(13) + "Donated to the Public Domain" + Chr$(13) + "by" + Chr$(13) + "Dave Evers, Quincy, IL" + Chr$(13) + Chr$(13) + "Enjoy!!!"
  116.     ReturnVal% = MsgBox(Msg$, 64, "About IconView")
  117. End Sub
  118. Sub Command1_Click ()
  119.     IconName$ = Dir1.Path + "\" + File1.FileName
  120.     If InStr(UCase$(IconName$), ".ICO") Then
  121.        Msg$ = "The FileName below has been copied to the ClipBoard:" + Chr$(13) + Chr$(13) + "     " + IconName$
  122.        ReturnVal% = MsgBox(Msg$, 0, "ClipBoard Save")
  123.        ClipBoard.SetText IconName$
  124.     End If
  125.     End
  126. End Sub
  127. Sub Command3_Click ()
  128.     End
  129. End Sub
  130. Sub Dir1_Change ()
  131.     File1.Path = Dir1.Path
  132.     File1.Pattern = "*.ICO"
  133.     If Right$(Dir1.Path, 1) = "\" Then
  134.        Label1.Caption = Dir1.Path + "*.ico"
  135.     Else
  136.        Label1.Caption = Dir1.Path + "\*.ico"
  137.     End If
  138. End Sub
  139. Sub Drive1_Change ()
  140. TryIt:
  141.     On Error Resume Next
  142.     Dir1.Path = Drive1.Drive
  143.     If Err Then
  144.         Beep
  145.         Msg$ = "No Disk or Unformatted Disk in Drive."
  146.         ReturnVal% = MsgBox(Msg$, 21, "")
  147.         If ReturnVal% = 4 Then GoTo TryIt
  148.         If ReturnVal% = 2 Then Drive1.Drive = Dir1.Path
  149.     End If
  150.     Label1.Caption = Dir1.Path
  151. End Sub
  152. Sub File1_Click ()
  153.      PictureName$ = Dir1.Path + "\" + File1.FileName
  154.      Picture1.Picture = LoadPicture(PictureName$)
  155.      Label1.Caption = PictureName$
  156. End Sub
  157. Sub Form_Load ()
  158.     File1.Pattern = "*.ico"
  159.     If Right$(Dir1.Path, 1) = "\" Then
  160.        Label1.Caption = Dir1.Path + "*.ico"
  161.     Else
  162.        Label1.Caption = Dir1.Path + "\*.ico"
  163.     End If
  164. End Sub
  165. Sub HelpMenu_Click ()
  166.     Msg$ = "Select Icon to be viewed using Drive, Directory, and File controls."
  167.     Msg$ = Msg$ + Chr$(13) + Chr$(13) + "To save Icon path and filename to Clipboard, press [Copy Name] button."
  168.     ReturnVal% = MsgBox(Msg$, 64, "IconView Help")
  169. End Sub
  170.