赢得XP的Dekstop选择框? VB.net [英] Dekstop Selection Box for win XP? VB.net

查看:59
本文介绍了赢得XP的Dekstop选择框? VB.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人对如何编写程序有任何想法,当您单击并拖动胜利时会在哪里. XP桌面,它会有一个蓝色的透明选择框吗?而不是灰色的轮廓框?
像这样: http://freewebcite.webs.com/Untitled.jpg [

Does anyone have an idea on how to make a program, where when you click and drag on a win. XP desktop, it''ll have a blue transluant selection box? instead of the gray outlined box?
Like this:http://freewebcite.webs.com/Untitled.jpg[^]
but on Win XP?

I have no idea where to start. All i can think is that it has to do something with pictures boxes.

推荐答案

乍一看,这是您无法控制的.

第二步,尽管这可能很困难,但是您可以尝试执行此操作.

您将需要使用原始Window API和P/Invoke完成所有工作.首先,您需要使用GetDesktopWindow获取桌面窗口(它是一个窗口)的句柄.之后,您将需要获取此窗口的现有 Window Function .将GetWindowLong与获得的句柄(第一个参数)和索引GWL_WNDPROC(第二个参数)一起使用.编写自己的窗口函数,并使用一些半透明的窗口形式(可用于模拟选择)执行所有特殊处理(鼠标处理等).当需要窗口函数"中的默认处理时,请调用通过GetWindowLong获得的处理.使用SetWindowLong将新的Window Function安装到桌面窗口上,并使用与GetWindowLong相同的参数.

参见:
GetDesktopWindow [ GetWindowLong [ SetWindowLong [消息和消息队列 [ ^ ].

主要技巧是为桌面编写修改后的窗口函数".您将需要学习很多有关原始Windows消息处理以及选择过程中涉及的所有消息的知识.一点都不容易.你真的想打扰吗?

—SA
At first glance, this is out of your control.

On second though, you can try to do it, even though this might be pretty difficult.

You will need to do all the work using raw Window API and P/Invoke. First, you need to get a handle of desktop window (it is a window), using GetDesktopWindow. After that, you will need to get an existing Window Function of this window. Use GetWindowLong, with the obtained handle (first parameter) and the index of GWL_WNDPROC (second parameter). Write your own Window Function and perform all the special processing (mouse handling, etc.) using some semi-transparent Window form you can use to simulate selection. When you need default processing in the Window Function, call the one you obtained via GetWindowLong. Install your new Window Function onto the desktop window using SetWindowLong with the same parameters you used with GetWindowLong.

See:
GetDesktopWindow[^],
GetWindowLong[^],
SetWindowLong[^],
Messages and Message Queues[^].

Major trick will be to write your modified Window Function for a desktop. You will need to learn a lot about raw Windows message processing and all the messages which are involved in selection. Not easy at all. Do you really want to bother?

—SA


这篇关于赢得XP的Dekstop选择框? VB.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆