自己做了一个VB图片浏览器,求和高手帮我加插上一张\下一张的代码! 急须
Subresize_pic()Image1.Width=(Image1.Height/Image1.Picture.Height)*Image1.Picture.Widt...
Sub resize_pic()
Image1.Width = (Image1.Height / Image1.Picture.Height) * Image1.Picture.Width
Form1.Width = Image1.Left + Image1.Width + 500
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
Image1.Picture = LoadPicture(Dir1.Path & "\" & File1.FileName)
resize_pic
End Sub
Private Sub Form_Load()
File1.Pattern = "*.gif;*.bmp;*.jpg"
Image1.Stretch = False
End Sub
Private Sub Image1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
strpath = Data.Files(1)
If Right(strpath, 3) = "jpg" Or Right(strpath, 3) = "bmp" Or Right(strpath, 3) = "gif" Then
Image1.Picture = LoadPicture(strpath)
resize_pic
Else
MsgBox "Sorry, I don't know about this file name"
End If
End Sub
不知道一楼的大大可不可以详细地把代码列来呢?
小弟对于编程实在不怎么样... 展开
Image1.Width = (Image1.Height / Image1.Picture.Height) * Image1.Picture.Width
Form1.Width = Image1.Left + Image1.Width + 500
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
Image1.Picture = LoadPicture(Dir1.Path & "\" & File1.FileName)
resize_pic
End Sub
Private Sub Form_Load()
File1.Pattern = "*.gif;*.bmp;*.jpg"
Image1.Stretch = False
End Sub
Private Sub Image1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
strpath = Data.Files(1)
If Right(strpath, 3) = "jpg" Or Right(strpath, 3) = "bmp" Or Right(strpath, 3) = "gif" Then
Image1.Picture = LoadPicture(strpath)
resize_pic
Else
MsgBox "Sorry, I don't know about this file name"
End If
End Sub
不知道一楼的大大可不可以详细地把代码列来呢?
小弟对于编程实在不怎么样... 展开
2个回答
2010-12-25
展开全部
Private Sub File1_Click()
Image1.Picture = LoadPicture(Dir1.Path & "\" & File1.FileName)
resize_pic
End Sub
改成如下============================
Private Sub File1_Click()
Image1.Picture = LoadPicture(Dir1.Path & "\" & File1.List(File1.ListIndex))
resize_pic
End Sub
上下翻的话,只要加减File1.ListIndex,然后调用File1_Click就可以了
Image1.Picture = LoadPicture(Dir1.Path & "\" & File1.FileName)
resize_pic
End Sub
改成如下============================
Private Sub File1_Click()
Image1.Picture = LoadPicture(Dir1.Path & "\" & File1.List(File1.ListIndex))
resize_pic
End Sub
上下翻的话,只要加减File1.ListIndex,然后调用File1_Click就可以了
博思aippt
2024-07-20 广告
2024-07-20 广告
作为深圳市博思云创科技有限公司的工作人员,对于Word文档生成PPT的操作,我们有以下建议:1. 使用另存为功能:在Word中编辑完文档后,点击文件->另存为,选择PowerPoint演示文稿(*.pptx)格式,即可将文档内容转换为PPT...
点击进入详情页
本回答由博思aippt提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询