home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / iconal2a / searchfo.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-10-11  |  4.4 KB  |  147 lines

  1. VERSION 5.00
  2. Begin VB.Form SearchForm 
  3.    Caption         =   "Search Icons"
  4.    ClientHeight    =   3930
  5.    ClientLeft      =   1140
  6.    ClientTop       =   1515
  7.    ClientWidth     =   6540
  8.    Icon            =   "SearchForm.frx":0000
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   262
  14.    ScaleMode       =   3  'Pixel
  15.    ScaleWidth      =   436
  16.    Begin VB.CommandButton Command1 
  17.       Caption         =   "COPY"
  18.       Height          =   420
  19.       Left            =   5400
  20.       TabIndex        =   3
  21.       Top             =   1530
  22.       Width           =   870
  23.    End
  24.    Begin VB.FileListBox File1 
  25.       BackColor       =   &H00E0E0E0&
  26.       ForeColor       =   &H00800000&
  27.       Height          =   2820
  28.       Left            =   2745
  29.       Pattern         =   "*.ico"
  30.       TabIndex        =   2
  31.       Top             =   945
  32.       Width           =   2490
  33.    End
  34.    Begin VB.DirListBox Dir1 
  35.       BackColor       =   &H00E0E0E0&
  36.       ForeColor       =   &H00800000&
  37.       Height          =   2340
  38.       Left            =   135
  39.       TabIndex        =   1
  40.       Top             =   1440
  41.       Width           =   2490
  42.    End
  43.    Begin VB.DriveListBox Drive1 
  44.       BackColor       =   &H00E0E0E0&
  45.       ForeColor       =   &H00800000&
  46.       Height          =   315
  47.       Left            =   135
  48.       TabIndex        =   0
  49.       Top             =   945
  50.       Width           =   2490
  51.    End
  52.    Begin VB.Label Label2 
  53.       BorderStyle     =   1  'Fixed Single
  54.       Caption         =   "Label2"
  55.       ForeColor       =   &H000000C0&
  56.       Height          =   555
  57.       Left            =   135
  58.       TabIndex        =   5
  59.       Top             =   360
  60.       Width           =   6270
  61.    End
  62.    Begin VB.Label Label1 
  63.       BackColor       =   &H00C0C0C0&
  64.       BorderStyle     =   1  'Fixed Single
  65.       Caption         =   "Label1"
  66.       ForeColor       =   &H000000C0&
  67.       Height          =   285
  68.       Left            =   135
  69.       TabIndex        =   4
  70.       Top             =   45
  71.       Width           =   6270
  72.    End
  73.    Begin VB.Image Image1 
  74.       Height          =   480
  75.       Left            =   5580
  76.       Top             =   945
  77.       Width           =   480
  78.    End
  79. Attribute VB_Name = "SearchForm"
  80. Attribute VB_GlobalNameSpace = False
  81. Attribute VB_Creatable = False
  82. Attribute VB_PredeclaredId = True
  83. Attribute VB_Exposed = False
  84. Private Sub Command1_Click() 'copy to temp
  85. On Error GoTo mkdir0
  86. MkDir IBpath$ & "\" & "_tempicons"
  87. IconBook.Dir1.Refresh
  88. mkdir0:
  89. FileCopy Label1.Caption, IBpath & "\" & "_tempicons" & "\" & File1.List(File1.ListIndex)
  90. Command1.Enabled = False
  91. IconBook.File1.Refresh
  92. End Sub
  93. Private Sub Dir1_Change()
  94. File1.Path = Dir1.Path
  95. Label2.Caption = "Icons in " & Dir1.Path & ": " & File1.ListCount
  96. Label1.Caption = Dir1.Path
  97. CopyEnabled
  98. End Sub
  99. Private Sub Dir1_Click()
  100. File1.Path = Dir1.List(Dir1.ListIndex)
  101. Label2.Caption = "Icons in " & File1.Path & ": " & File1.ListCount
  102. Label1.Caption = Dir1.List(Dir1.ListIndex)
  103. CopyEnabled
  104. End Sub
  105. Private Sub Drive1_Change()
  106. On Error GoTo Dri1
  107. Dir1.Path = Drive1.Drive
  108. File1.Path = Dir1.Path
  109. Label2.Caption = "Icons in " & Dir1.Path & ": " & File1.ListCount
  110. Label1.Caption = Drive1.Drive
  111. CopyEnabled
  112. Exit Sub
  113. Dri1:
  114. Temp$ = MsgBox("There has been an error !", vbCritical + vbOKOnly, "IconAlbum - System message")
  115. End Sub
  116. Private Sub File1_Click()
  117. If Right(File1.Path, 1) = "\" Then
  118. Image1.Picture = LoadPicture(File1.Path + File1.List(File1.ListIndex))
  119. Label1.Caption = File1.Path + File1.List(File1.ListIndex)
  120. Image1.Picture = LoadPicture(File1.Path + "\" + File1.List(File1.ListIndex))
  121. Label1.Caption = File1.Path + "\" + File1.List(File1.ListIndex)
  122. End If
  123. CopyEnabled
  124. End Sub
  125. Private Sub Form_Activate()
  126. Command1.Enabled = False
  127. End Sub
  128. Private Sub Form_Load()
  129. SearchForm.Move (Screen.Width - SearchForm.Width) / 2, (Screen.Height - SearchForm.Height) / 2
  130. Drive1.Drive = "c:"
  131. Dir1.Path = "c:\"
  132. File1.Path = "c:\"
  133. Label1.Caption = ""
  134. End Sub
  135. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  136. Cancel = True
  137. SearchForm.Hide
  138. IconBook.Show
  139. End Sub
  140. Private Sub CopyEnabled()
  141. If File1.ListIndex = -1 Then
  142. Command1.Enabled = False
  143. Image1.Picture = LoadPicture("")
  144. Command1.Enabled = True
  145. End If
  146. End Sub
  147.