lihonggen0(用VB) 详细点!!

解决方案 »

  1.   

    在对你的picture的定义click()函数,显示完成你的任务 doc=picture.all
    body.view =doc.view
      

  2.   

    有TreeView显示文件夹和文件,当选中某一个文件时,再用LoadPicture 函数加
    载图像文件
    形如:
    Picture1.Picture=LoadPicture("C:\AAA.BMP")
    LoadPicture的具体用法请查阅MSDN
      

  3.   

    to : iqds(芊芊) (  ) 
    我已经新建了picturebox(100)
    就是控件数组,如何定义该控件各个控件的click()事件???
      

  4.   

    '送打开代码
    '根据文件路径显示图片
    cdgEMP是一个commonDialog控件
    Private Sub picEMP_DblClick(index as integer)
        Dim strFile As String
        Dim strFilter As String
        Dim strArr() As String
        Dim i As Integer
        Static strPath As String
        On Error Resume Next
        If strPath = "" Then strPath = App.Path
        cdgEMP.DialogTitle = "选择员工照片"
        strFilter = "图形文件(*.JPG,*.BMP,*.GIF)|*.JPEG;*.JPG;*.BMP;*.GIF" _
                    & "|所有文件(*.*)|*.*"
        cdgEMP.Filter = strFilter
        cdgEMP.InitDir = strPath
        cdgEMP.FileName = ""
        cdgEMP.ShowOpen
        If Err.Number = cdlCancel Then Exit Sub
        strFile = cdgEMP.FileName
        If strFile <> "" Then
    '        mobjMain.Photo = strFile
            strArr = Split(strFile, "\", , vbTextCompare)
            strPath = ""
            For i = 0 To UBound(strArr) - 1
                strPath = strPath & strArr(i)
            Next i
            Me.picEMP.Picture = LoadPicture(strFile)
        End If
    End Sub