谁知道VB 怎么设计一个图片浏览器? 还有就是VB设计图片的像素采集,谢谢啦

来源:百度知道 编辑:UC知道 时间:2024/05/31 06:43:01
希望大家知道的给个答案,本人急用,谢谢啦

Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub

Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub

Private Sub File1_Click()
If (Right(File1.Path, 1)) = "\" Then
Picture2.Picture = LoadPicture(File1.Path & File1.FileName)
Else
Picture2.Picture = LoadPicture(File1.Path & "\" & File1.FileName)
End If
End Sub

Private Sub Form_Load()
Picture2.Left = 0
Picture2.Top = 0

End Sub

Private Sub HScroll1_Change()
Picture2.Left = -HScroll1.Value

End Sub

Private Sub HScroll1_Scroll()
Picture2.Left = -HScroll1.Value

End Sub

Private Sub Picture2_Change()

If Picture2.Height < Picture1.Height Then
HScroll1.Enabled = False
Else
HScroll1.Enabled = True
HScroll1.Max = Picture2.Width - HScroll1.Width
End If
If Picture2.Width < Picture1.Width Then