找回密码
 加入
搜索
查看: 3170|回复: 7

[系统综合] 修改文件透明度 无反应求教 已解决

  [复制链接]
发表于 2012-6-9 22:08:12 | 显示全部楼层 |阅读模式
本帖最后由 ainizm 于 2013-4-30 12:13 编辑
HotKeySet("!1", "tmd")

Func tmd()
        If @HotKeyPressed = "!1"  Then 
        $L = DllCall("user32.dll", "long", "GetWindowLongA", "hwnd", $title1, "int", -20);
        $L = BitOr($L, 0x00080000);
        $Result = DllCall("user32.dll", "long", "SetWindowLongA", "hwnd", $title1, "int", -20, "long", $L);
        $Result = DllCall("user32.dll", "int", "SetLayeredWindowAttributes", "hwnd", $title1, "int", 0, "int", 100, "int", 0x00000002);
        EndIf
EndFunc
修改文件透明度,为何没反应,请教
发表于 2012-6-9 22:52:58 | 显示全部楼层
文件透明度?
 楼主| 发表于 2012-6-9 23:24:39 | 显示全部楼层
修改指定程序的窗口透明度
$title1 是程序窗口标题
发表于 2012-6-10 00:03:06 | 显示全部楼层
你确定窗体是ansi?不是unicode?为什么要用GetWindowLongA?
发表于 2012-6-10 00:06:41 | 显示全部楼层
api的不会
WinSetTrans

评分

参与人数 1金钱 +10 收起 理由
魔导 + 10 降妖除魔也

查看全部评分

发表于 2012-6-10 20:30:46 | 显示全部楼层
本帖最后由 xms77 于 2012-6-10 20:36 编辑

回复 1# ainizm
楼主,你的代码是可以文件透明的。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2012-6-11 08:32:11 | 显示全部楼层
楼主的代码可行啊
#include <WinAPI.au3>
Global $title1
HotKeySet("!1", "tmd")
HotKeySet("{esc}", "_exit")
While 1
        $title1 = _WinAPI_GetForegroundWindow()
        Sleep(100)
WEnd
Func tmd()
        If @HotKeyPressed = "!1" Then
                $L = DllCall("user32.dll", "long", "GetWindowLongA", "hwnd", $title1, "int", -20);
                $L = BitOR($L, 0x00080000);
                $Result = DllCall("user32.dll", "long", "SetWindowLongA", "hwnd", $title1, "int", -20, "long", $L);
                $Result = DllCall("user32.dll", "int", "SetLayeredWindowAttributes", "hwnd", $title1, "int", 0, "int", 100, "int", 0x00000002);
        EndIf
EndFunc   ;==>tmd
Func _exit()
        Exit
EndFunc   ;==>_exit

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-19 01:15 , Processed in 0.084052 second(s), 29 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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