[怎样用VB做一个图片浏览器]Public Class Form1 Dim i As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click i = i - 1 If (i...+阅读
Private Sub Form_Load()
'初始化两个图片框的位置
PicFather.Move 0, 0, ScaleWidth - VScroll1.Width, ScaleHeight - HScroll1.Height
PicSon.Move 0, 0 '将子图片框移到容器(父图片框)左上角
'定位水平滚动条
HScroll1.Top = PicFather.Height
HScroll1.Left = 0
HScroll1.Width = PicFather.Width
'定位垂直滚动条
VScroll1.Top = 0
VScroll1.Left = PicFather.Width
VScroll1.Height = PicFather.Height
'设置滚动条的Max属性
HScroll1.Max = PicSon.ScaleWidth - PicFather.ScaleWidth
VScroll1.Max = PicSon.ScaleHeight - PicFather.ScaleHeight
'判断图形是否已完整显示。若是,则不显示滚动条。
VScroll1.Visible = (PicFather.ScaleHeight HScroll1.Visible = (PicFather.ScaleWidth End Sub
Private Sub Form_Resize()
Form_Load
End Sub
Private Sub HScroll1_Change()
PicSon.Left = -HScroll1.Value
End Sub
Private Sub PicSon_Click()
End Sub
Private Sub VScroll1_Change()
PicSon.Top = -VScroll1.Value
End Sub
以下为关联文档:
怎么用VB做图片浏览器VB6.0实现图片旋转 使用过ACDSEE的朋友一定对它的JPG图片旋转功能记忆犹新,其实我们利用VB6的先进功能,可以对任意格式的图片文件(包括JPG、GIF、BMP、ICO等)进行45度、180度旋...
如何用VB调用windows图片浏览器Private Sub Command1_Click() Dim strPicPath As String strPicPath = "C:\Documents and Settings\Administrator\My Documents\My Pictures\1.jpg" strPicPath = """" & strPic...
怎么用vb编写一个图片浏览器呢Dim i% '用按钮更换图片 Private Sub Command1_Click() i = i + 1 If i > 5 Then i = 0 Image1.Picture = LoadPicture(App.Path & "\0" & i & ".jpg") End Sub '初始化 Private...
vb编程制作一个简单的图片浏览器上学期的作业,现在在电脑里,我把代码复制下 Private Sub Dir1_Change() File1.Path = Dir1.Path End Sub Private Sub Drive1_Change() Dir1.Path = Drive1.Drive End Sub Pri...
怎样制作VB图象浏览器用全局变量保存目前的图片编号 用Timer控件实现定时切换图片 Dim N As Integer Private Sub Command1_Click() Timer1.Enabled = Not Timer1.Enabled If Timer1.Enabled The...
vb怎么用ListBox和image做一个图片浏览器Private Sub List1_Click() Select Case List1.ListIndex Case 0 Image1.Picture = LoadPicture(App.Path & "\0.jpg") Case 1 Image1.Picture = LoadPicture(App.Path & "\1.j...