缩略图查看器图像 [英] thumbnail viewer image
本文介绍了缩略图查看器图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在创建指甲图像,但它在表单加载事件中造成了问题.
Drive1 ="E:\"
Dir1.Path =项目"
找不到错误路径
我不知道为什么请帮帮我.
I''m creating thumb nail images but it creates a problem in the form load event.
Drive1 = "E:\"
Dir1.Path = "Project"
error path not found
I don''t know why. Please help me.
Private Sub Command1_Click()
Dim I, C As Integer
C = File1.ListCount
MsgBox C
If C > 9 Then
C = 9
End If
For I = 0 To C
File1.ListIndex = I
Image1.Item(I) = LoadPicture(Dir1.Path & "" & "/" & File1.FileName)
Next
End Sub
Private Sub Command2_Click()
graphics.Hide
b1.Show
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
On Error GoTo tt:
Dir1.Path = Drive1
Exit Sub
tt:
MsgBox "The divice cannot acces"
End Sub
Private Sub Form_Load()
List1.AddItem "*.jpg"
List1.AddItem "*.bmp"
List1.AddItem "*gif"
Drive1 = "E:\"
Dir1.Path = "Project"
Image1(Index).Stretch = True
End Sub
Private Sub Image1_DblClick(Index As Integer)
g2.Show
g2.Image1.Picture = Image1.Item(Index).Picture
End Sub
Private Sub Image1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Item(Index).ToolTipText = Dir1.Path & File1.FileName
End Sub
Private Sub List1_Click()
File1.Pattern = List1.Text
End Sub
推荐答案
您没有指定对象Dir1
是什么类型,但是我猜测如果您设置的是"Path",它可能会查找整个目录路径,而不仅仅是名称最后一个文件夹.例如,它可能正在寻找"E:\ Project"而不是"Project".另一种可能性是那里没有名为"Project"的文件夹.否则,您将丢失目录和文件名之间的斜线.尝试调试以找出真正使用的值.
You don''t specify what kind of object Dir1
is, but I''m guessing that if you''re setting something called "Path" that it might be looking for an whole directory path, not just the name of the last folder. For example, it might be looking for "E:\Project" instead of just "Project". Another possibility is that there just isn''t a folder called "Project" there. Or you are missing the slash that goes between the directory and file name. Try debugging to find out what values are really being used.
这篇关于缩略图查看器图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文