同vb设计一个图片浏览器~
来源:百度知道 编辑:UC知道 时间:2024/09/21 09:03:03
Private Sub Dir1_Change()
File1.Pattern = "*.bmp;*.ico;*.wmf;*.emf;*.gif;*.jpg"
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
p = File1.Path & "\" & File1.FileName
Image1.Picture = LoadPicture(p)
VScroll1.Min = 0
VScroll1.Max = Image1.Height - Picture1.Height
HScroll1.Min = 0
HScroll1.Max = Image1.Width - Picture1.Width
End Sub
Private Sub HScroll1_Change()
Image1.Left = -HScroll1.Value
End Sub
Private Sub HScroll1_Scroll()
Image1.Left = -HScroll1.Value
End Sub
Private Sub VScroll1_Change()
Image1.Top = -VScroll1.Value
End Sub
Private Sub VScroll1_Scroll()
Image1.Top = -VScroll1.Value
End Sub
用vb写一个图片浏览器吧?不复杂啊.
以前写过,直接在数据库里读取图片数据,再显示出来。另外包括往数据库插入图片的功能。
代码好象还在家里的机子上,找到的话再发,呵呵