TC官方合作论坛

 找回密码
 立即注册
查看: 1894|回复: 6

[问题] 要怎么实现多窗口 键鼠同不 请大侠指点下 谢谢

[复制链接]
发表于 2012-2-23 23:18:29 | 显示全部楼层 |阅读模式

马上加入TC

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
求指点
回复

使用道具 举报

发表于 2012-2-24 00:21:02 | 显示全部楼层
我用按键试过,但是由于延时不理想。。继续努力
回复 支持 反对

使用道具 举报

发表于 2012-2-24 01:13:06 | 显示全部楼层
我来了
回复 支持 反对

使用道具 举报

发表于 2012-2-24 14:36:05 | 显示全部楼层
不知道...........
回复 支持 反对

使用道具 举报

发表于 2012-2-25 19:46:01 | 显示全部楼层
#import "dm.dmsoft" dm
#include"varlist.t"
namespace 多窗体同步


int hwnd,keycode
//********************************//
//***********线程任务**************//
//********************************//
function bool beginsomething()
//多窗体同步.register()  //注册绑定
help.messagebox(convert.inttostr(keycode))
    while(true)
        int k=keyboard.waitkey()
        help.sleep(100)
        if(k!=118)
          // dm.KeyPress(k)
          超级键盘.按键(k,10)
           help.sleep(20)
        endif
    endwhile       
return true
endfunction
//********************************//
//***********开始按钮**************//
//********************************//
function bool start_click()
        while (true)
                keycode=keyboard.waitkey()
                help.sleep(500)
                if(keycode==118)
                        //hwnd=dm.GetMousePointWindow()
                        window.getmousemovewndhand()   
                        int h=thread.beginthread("多窗体同步.beginsomething")
                        varlist.addstr(h)
                else
                    多窗体同步.beginsomething()
                endif
        endwhile
return true
endfunction

//********************************//
//***********退出按钮**************//
//********************************//
function bool exit_click()
//多窗体同步.free()
   多窗体同步.closeThead()
        help.exit()
return true
endfunction

//********************************//
        //********注册绑定*********//
//********************************//
function bool register()
    int dm_ret = dm.BindWindow(hwnd,"dx","dx","dx",0)
    help.sleep(20)
    if (dm_ret==0)
        help.messagebox("大漠绑定失败")
        help.exit()
    endif
return true
endfunction

//********************************//
        //********大漠解除绑定*********//
//********************************//
function bool free()
  // dm.UnBindWindow()
   help.sleep(500)
return true
endfunction
//********************************//
        //********窗体销毁方法*********//
//********************************//
function bool destroy()
多窗体同步.exit_click()
return true
endfunction
//********************************//
        //********关闭多线程*********//
//********************************//
function bool closeThead()
        string str=varlist.returnstr()
        int wz
                while(true)
                        wz=str.findstr(str,"|")
                        thread.closethread(convert.strtoint(str.strsub(str,0,wz),0))
                        help.sleep(200)
                        if (wz==-1)
                                break
                        else
                                str=str.strcut(str,wz+1,true)
                        endif
                endwhile
return true
endfunction



endnamespace
回复 支持 反对

使用道具 举报

发表于 2012-3-13 18:46:28 | 显示全部楼层
不喜欢英文.....坚决支持中文!!!
回复 支持 反对

使用道具 举报

发表于 2012-3-20 17:15:10 | 显示全部楼层
学习一下
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条

关闭

小黑屋|TC官方合作论坛 (苏ICP备18045623号)

GMT+8, 2024-5-29 16:21 , Processed in 0.053823 second(s), 23 queries .

Powered by 海安简单软件服务部

© 2008-2019 版权所有 保留所有权利

快速回复 返回顶部 返回列表