首页 开发技术 VB     /    获取屏幕某像素、坐标颜色(包括透明的)

获取屏幕某像素、坐标颜色(包括透明的)

上传者: wangerxiao0606 | 上传时间:2024/2/7 16:14:54 | 文件大小:67KB | 文件类型:rar
获取屏幕某像素、坐标颜色(包括透明的)
是vb.net程序,不是VB的,自己写的,压缩包里是工程文件,代码简洁,打开工程文件一看就明白,然后可以改成你自己需要的使用方法是输入X,Y坐标,一点按钮,窗口背景色就变成XY所对应的颜色。
VB.NET获取屏幕某坐标颜色总体两种方法:1一种是获取DC,然后直接获取对应坐标的COLOR值,但是如果你获取的那个坐标锁在UI是个透明或者半透明性质的,整个COLOR值就不能直接用来赋值给控件颜色。
这种方法不通用。
2.通用的,是将屏幕保存成一个图片,然后取图片坐标颜色,这很浪费资源。
我测试了一下,放到计时器里,每0.2秒运行一次,程序运行起来一直占用480到680M内存。
本例子采用这个原理,但我优化了函数,其实取一个像素就可以,这和直接获取像素颜色也差不多了,而且不费一点内存和CPU,CPU使用率0,内存不到5M。

文件下载

资源详情

[{"title":"(28个子文件67KB)获取屏幕某像素、坐标颜色(包括透明的)","children":[{"title":"获取屏幕某坐标颜色","children":[{"title":"xx.sln <span style='color:#111;'>903B</span>","children":null,"spread":false},{"title":"xx","children":[{"title":"Form1.vb <span style='color:#111;'>2.46KB</span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Release","children":null,"spread":false},{"title":"Debug","children":[{"title":"xx.pdb <span style='color:#111;'>49.50KB</span>","children":null,"spread":false},{"title":"xx.vshost.exe <span style='color:#111;'>13.99KB</span>","children":null,"spread":false},{"title":"xx.exe <span style='color:#111;'>24.00KB</span>","children":null,"spread":false},{"title":"xx.xml <span style='color:#111;'>110B</span>","children":null,"spread":false},{"title":"xx.vshost.exe.manifest <span style='color:#111;'>490B</span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"obj","children":[{"title":"Release","children":null,"spread":false},{"title":"Debug","children":[{"title":"xx.Form1.resources <span style='color:#111;'>180B</span>","children":null,"spread":false},{"title":"xx.pdb <span style='color:#111;'>49.50KB</span>","children":null,"spread":false},{"title":"xx.exe <span style='color:#111;'>24.00KB</span>","children":null,"spread":false},{"title":"xx.xml <span style='color:#111;'>110B</span>","children":null,"spread":false},{"title":"TempPE","children":[{"title":"MyProject.Resources.Designer.vb.dll <span style='color:#111;'>7.50KB</span>","children":null,"spread":false}],"spread":true},{"title":"xx.vbproj.GenerateResource.Cache <span style='color:#111;'>847B</span>","children":null,"spread":false},{"title":"xx.vbproj.FileListAbsolute.txt <span style='color:#111;'>2.92KB</span>","children":null,"spread":false},{"title":"xx.Resources.resources <span style='color:#111;'>180B</span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Module1.vb <span style='color:#111;'>39B</span>","children":null,"spread":false},{"title":"xx.vbproj <span style='color:#111;'>4.99KB</span>","children":null,"spread":false},{"title":"MyProject","children":[{"title":"Resources.Designer.vb <span style='color:#111;'>2.72KB</span>","children":null,"spread":false},{"title":"Application.myapp <span style='color:#111;'>510B</span>","children":null,"spread":false},{"title":"Resources.resx <span style='color:#111;'>5.48KB</span>","children":null,"spread":false},{"title":"Settings.Designer.vb <span style='color:#111;'>2.95KB</span>","children":null,"spread":false},{"title":"Application.Designer.vb <span style='color:#111;'>1.47KB</span>","children":null,"spread":false},{"title":"Settings.settings <span style='color:#111;'>279B</span>","children":null,"spread":false},{"title":"AssemblyInfo.vb <span style='color:#111;'>1.04KB</span>","children":null,"spread":false}],"spread":true},{"title":"Form1.resx <span style='color:#111;'>5.68KB</span>","children":null,"spread":false},{"title":"xx.vbproj.user <span style='color:#111;'>74B</span>","children":null,"spread":false},{"title":"Form1.Designer.vb <span style='color:#111;'>5.01KB</span>","children":null,"spread":false}],"spread":true},{"title":"xx.suo <span style='color:#111;'>17.00KB</span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • qq_40494399:
    有用,可以用2020-12-09
  • li13123443561:
    可以说是及时雨啊,不过不知道多次调用了,内存是不是会爆掉2014-01-12

免责申明

【好快吧下载】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【好快吧下载】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【好快吧下载】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,8686821#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明