[怎么用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...+阅读
窗体上放dirvelistbox控件dirlistbox控件filelistbox控件image控件 label控件各一个
然后在窗体下写如下代码 程序运行后选择图片所在路径就可以在image内显示
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
mpath = File1.Path
If Right(mpath, 1) <> "\" Then mpath = mpath + "\"
mpath = mpath + File1.FileName
Form1.Image1.Picture = LoadPicture(mpath)
Label1 = mpath
End Sub
以下为关联文档:
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...
怎样去做一个VB的图片浏览器啊。。Private Sub Form_Load() '初始化两个图片框的位置 PicFather.Move 0, 0, ScaleWidth - VScroll1.Width, ScaleHeight - HScroll1.Height PicSon.Move 0, 0 '将子图片框移到...
VB制作一个图片浏览器!100分!简单点的啊。窗体上放一个timer1、一个picture1和一个file1控件,然后复制下列代码即可。 Const DR As String = "G:\下载" '图片所在文件夹 Dim NI As Integer Private Sub Form...
vb制作图片浏览器要怎么实现如WINDOWS自带的图片浏览器的最合没有代码,只好我自己写一个给你啰。试试这个代码。 ================== Option Explicit Dim R As RECT Dim Ratio As Single Private Type RECT Left As Long Top As Long R...
用VB设计一个图片浏览器这个是以前做的一个。 括号里面是图片的路径,当时晕晕乎乎的弄的 Private Sub Picture1_Paint() Picture1.PaintPicture Picture1, 0, 0, Picture1.Width, Picture1.Height E...
谁知道VB怎么设计一个图片浏览器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....
在VB中如何调用windows自带的图片浏览器打开指定的文件呀请使用ShellExecute函数: Option Explicit Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As Strin...