Foxtable(狐表)用户栏目专家坐堂 → 图片管理器另存问题


  共有2102人关注过本帖树形打印复制链接

主题:图片管理器另存问题

帅哥哟,离线,有人找我吗?
douglas738888
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:五尾狐 帖子:1172 积分:8772 威望:0 精华:0 注册:2012/4/18 16:28:00
图片管理器另存问题  发帖心情 Post By:2018/11/1 15:58:00 [只看该作者]

请教老师,使用图片管理器,但单独设了个按钮,用于对图片管理器选中的图片另存于自定义的路径中,下面代码报错,字符串...转换到BOOLEAN无效

麻烦老师看看,哪里代码错了

 

Dim piv As WinForm.PictureViewer = e.Form.Controls("PictureViewer1")
If piv.SelectedItem Then

Else
    '--------------打开存放窗口·自由选择·文件存放路径 
    Dim dlg  As New FolderBrowserDialog
    If dlg.ShowDialog = DialogResult.Ok  Then
        Dim path As String = dlg.SelectedPath & "\" 
        '--------------FTP
        Dim ftp1 As New FtpClient
        ftp1.Host = *****
        ftp1.Account = ******
        ftp1.Password = *****
        ftp1.RootDir = RootDir
        '---------------FTP·下载
        Dim dr As Row = Tables("事件主表").Current
            If dr.IsNull("上传事件资料_Jpg图片") = True Then

                Messagebox.Show(dr("事件_主题") & "    无可下载文件!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
            Else
                Dim Path1 As String '指定下载字符
                If dr("上传事件资料_Jpg图片") IsNot Nothing Then 
                    Path1 = Path & "\" & dr("上传事件资料_Jpg图片")
                    ftp1.Download(dr("上传事件资料_Jpg图片"),Path1,True)
                End If
                Messagebox.show("文件下载成功!" & vbcrlf & "文件名称: " & dr("上传事件资料_Jpg图片"),"提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
            End If
        ftp1.Close
    End If
End If

[此贴子已经被作者于2018/11/1 16:13:41编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/11/1 17:28:00 [只看该作者]


Dim piv As WinForm.PictureViewer = e.Form.Controls("PictureViewer1")
If piv.SelectedItem > "" Then
    '--------------打开存放窗口·自由选择·文件存放路径
    Dim dlg  As New FolderBrowserDialog
    If dlg.ShowDialog = DialogResult.Ok  Then
        Dim path As String = dlg.SelectedPath & "\"
        '--------------FTP
        Dim ftp1 As New FtpClient
        ftp1.Host = "" '*****
        ftp1.Account = "" '******
        ftp1.Password = "" '*****
        ftp1.RootDir = "" 'RootDir
        '---------------FTP·下载
        msgbox(piv.SelectedItem)
        ftp1.Download(piv.SelectedItem,Path & FileSys.GetName(piv.SelectedItem), True)       
        ftp1.Close
    End If
End If

 回到顶部