以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助] (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=107699) |
-- 作者:江南小镇 -- 发布时间:2017/10/8 10:16:00 -- [求助] Dim txt As String = Functions.Execute("窗口表数据查找",Tables("文件管理"),e.Form.Controls("TextBox1").Text) \'执行查询 Tables("文件管理").Filter = txt 老师,我设置上面代码后为有下面的报错。 .NET Framework 版本:2.0.50727.3655 Foxtable 版本:2017.4.22.1 错误所在事件:窗口,文件管理,PictureBox1,BeforeGetImage 详细错误信息: Object reference not set to an instance of an object. 下面是图片控件的代码。 Dim pic As WinForm.PictureBox = e.Sender Dim wjm As String = Tables("文件管理").Current("文件") If wjm.Contains(".") = False Then \'若文件名不包含.,说明是未知文件 e.File = ProjectPath & "images/other.png" Else Dim i As Integer = wjm.LastIndexOf(".") Dim kzm As String = wjm.SubString(i+1) Dim kzms As String = "swf accdb mdb psd png xls xlsx bmp rar jpg doc docx zip pdf txt ppt exe" \'定义已知扩展名 If kzms.Contains(kzm) = True Then e.file = ProjectPath & "images/" & kzm & ".png" Else e.File = ProjectPath & "images/other.png" End If End If |
-- 作者:有点甜 -- 发布时间:2017/10/8 10:41:00 -- Dim pic As WinForm.PictureBox = e.Sender
If Tables("文件管理").Current Is Nothing Then
e.File = ProjectPath & "images/other.png"
return
End If
Dim wjm As String = Tables("文件管理").Current("文件")
If wjm.Contains(".") = False Then \'若文件名不包含.,说明是未知文件
e.File = ProjectPath & "images/other.png"
Else
Dim i As Integer = wjm.LastIndexOf(".")
Dim kzm As String = wjm.SubString(i+1)
Dim kzms As String = "swf accdb mdb psd png xls xlsx bmp rar jpg doc docx zip pdf txt ppt exe" \'定义已知扩展名
If kzms.Contains(kzm) = True Then
e.file = ProjectPath & "images/" & kzm & ".png"
Else
e.File = ProjectPath & "images/other.png"
End If
End If
|
-- 作者:江南小镇 -- 发布时间:2017/10/8 12:33:00 -- 谢谢老师 |
-- 作者:江南小镇 -- 发布时间:2017/10/8 14:24:00 -- 老师,在打开图片编辑软件时希望能让项目最小化同时关闭独立窗口。 Dim Proc As New Process Proc.File = "D:\\软件安装\\图片管理\\ACDSee\\14.0\\ACDSee14" Proc.Start() Proc.WaitForExit() \'等带拍照程序退出. \'Forms("系统").baseform.visible=False [此贴子已经被作者于2017/10/8 15:01:52编辑过]
|
-- 作者:有点甜 -- 发布时间:2017/10/8 15:46:00 -- Forms("系统").baseform.windowstate = 1
Dim Proc As New Process
Proc.File = "D:\\软件安装\\图片管理\\ACDSee\\14.0\\ACDSee14"
Proc.Start()
Proc.WaitForExit() \'等带拍照程序退出.
|