以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  扫码打开指定路径文件  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=94688)

--  作者:281512373
--  发布时间:2016/12/29 14:36:00
--  扫码打开指定路径文件

表为临时表

扫码后 查询对应路径并用本地程序打开此文件

不知道怎么下手断断续续在学ft

 


图片点击可在新窗口打开查看此主题相关图片如下:2016-12-29_142909.png
图片点击可在新窗口打开查看


--  作者:有点色
--  发布时间:2016/12/29 14:57:00
--  

 文本框keydown事件

 

If e.keycode = 13 Then
    Dim fdr As DataRow = DataTables("表A").Find("valueText like \'%" & e.sender.text & "%\'")
    If fdr IsNot Nothing Then
        msgbox(fdr("path"))
        Dim proc As new Process
        proc.File = fdr("path")
        proc.Start
    Else
        msgbox("没找到")
    End If

    e.cancel = True
    e.Sender.SelectAll

End If


--  作者:281512373
--  发布时间:2016/12/31 14:36:00
--  
谢谢老师

图片点击可在新窗口打开查看此主题相关图片如下:2016-12-31_143043.png
图片点击可在新窗口打开查看

我还想加点功能,看能不能帮助一下。
一是扫下一个不同的条码时先关闭当前打开的文件,二是想把扫码扫码框跟输入法一样永远放在最顶层,只要有扫码动作就输入这个对话框。

--  作者:有点色
--  发布时间:2017/1/1 1:07:00
--  

1、关闭比较麻烦

 

http://www.foxtable.com/webhelp/scr/2713.htm

 

2、如果需要在任意地方都监测扫描,很麻烦,你要做个钩子

 

http://blog.csdn.net/yfiot/article/details/4146580

 


--  作者:281512373
--  发布时间:2017/1/2 8:56:00
--  
1、ShowAppWindow("Filename",5)可以找到并关闭;

 

2、如果需要在任意地方都监测扫描,很麻烦,你要做个钩子

 

http://blog.csdn.net/yfiot/article/details/4146580

(C弄出来了,还要与FT对接,好难呀!)


此主题相关图片如下:2017-01-02_084826.png
按此在新窗口浏览图片

[此贴子已经被作者于2017/1/2 9:10:14编辑过]

--  作者:281512373
--  发布时间:2017/1/2 10:16:00
--  
老师 你看这样行不行 我把文件做成pdf文件 用第三方插件在ft控件直接显示

检测扫码 这样是不是就简单多了

If e.keycode = 13 Then
    Dim fdr As DataRow = DataTables("EPDM").Find("valueText like \'%" & e.sender.text & "%\'")
    If fdr IsNot Nothing Then
        \'msgbox(fdr("path"))
        Dim tb1 As WinForm.TextBox = e.Form.Controls("TextBox2")
        Dim tb2 As WinForm.TextBox = e.Form.Controls("TextBox3")
        tb1.Value= fdr("path")
        tb2.Value= fdr("Filename")
        Dim proc As new Process
        proc.File = fdr("path")
        proc.Start
    Else
        msgbox("没找到")
    End If
    e.cancel = True
    e.Sender.SelectAll
End If