ainizm 发表于 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

修改文件透明度,为何没反应,请教

Qokelate 发表于 2012-6-9 22:52:58

文件透明度?

ainizm 发表于 2012-6-9 23:24:39

修改指定程序的窗口透明度
$title1 是程序窗口标题

netegg 发表于 2012-6-10 00:03:06

你确定窗体是ansi?不是unicode?为什么要用GetWindowLongA?

zldfsz 发表于 2012-6-10 00:06:41

api的不会WinSetTrans

xms77 发表于 2012-6-10 20:30:46

本帖最后由 xms77 于 2012-6-10 20:36 编辑

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

zerobin 发表于 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
页: [1]
查看完整版本: 修改文件透明度 无反应求教 已解决