【求助】为什么我的窗口透明是这样的。。。。
为什么我的窗口透明是这样的。。。。#include <ButtonConstants.au3>#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <ComboConstants.au3>
#Region ### START Koda GUI section ### Form=c:\users\yf\desktop\denglu\login.kxf
$Form1_1 = GUICreate("用户登录", 410, 271, 272, 175)
GUISetIcon("C:\Users\YF\Desktop\denglu\res\db.ico", -1)
$username = GUICtrlCreateLabel("用户名", 24, 168, 55, 20)
GUICtrlSetFont(-1, 12, 800, 0, "幼圆")
$psw = GUICtrlCreateLabel("密码", 24, 208, 38, 20)
GUICtrlSetFont(-1, 12, 800, 0, "幼圆")
GUICtrlCreateInput("", 88, 168, 161, 21)
GUICtrlCreateInput("", 88, 208, 161, 21)
$Pic1 = GUICtrlCreatePic("C:\Users\YF\Desktop\denglu\res\login.bmp", 0, 0, 409, 129)
$Button1 = GUICtrlCreateButton("登录", 304, 168, 89, 57)
GUICtrlSetFont(-1, 12, 800, 0, "幼圆")
$Pic2 = GUICtrlCreatePic("C:\Users\YF\Desktop\denglu\res\1.bmp", 264, 152, 28, 100)
GUISetBkColor(0xA4D4D3)
_WinAPI_SetLayeredWindowAttributes($Form1_1, 0xA4D4D3, 255)
$MARGINS = DllStructCreate("int;int;int;int")
DllStructSetData($MARGINS, 1, -1)
DllCall("dwmapi.dll", "none", "DwmExtendFrameIntoClientArea", "hwnd", $Form1_1, "ptr", DllStructGetPtr($MARGINS))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ### 不错!学习啦! 不知道是否需要这样的效果:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <ComboConstants.au3>
#Region ### START Koda GUI section ### Form=c:\users\yf\desktop\denglu\login.kxf
$Form1_1 = GUICreate("用户登录", 410, 271, 272, 175)
GUISetIcon("C:\Users\YF\Desktop\denglu\res\db.ico", -1)
$username = GUICtrlCreateLabel("用户名", 24, 168, 55, 20)
GUICtrlSetBkColor(-1,-2)
GUICtrlSetColor(-1,0x00ffff)
GUICtrlSetFont(-1, 12, 800, 0, "幼圆")
$psw = GUICtrlCreateLabel("密码", 24, 208, 58, 20)
GUICtrlSetBkColor(-1,-2)
GUICtrlSetColor(-1,0x00ffff)
GUICtrlSetFont(-1, 12, 800, 0, "幼圆")
GUICtrlCreateInput("", 88, 168, 161, 21)
GUICtrlCreateInput("", 88, 208, 161, 21)
;$Pic1 = GUICtrlCreatePic("C:\Users\YF\Desktop\denglu\res\login.bmp", 0, 0, 409, 129)
$Button1 = GUICtrlCreateButton("登录", 304, 168, 89, 57)
GUICtrlSetFont(-1, 12, 800, 0, "幼圆")
$Pic2 = GUICtrlCreatePic("C:\Users\YF\Desktop\denglu\res\1.bmp", 264, 152, 28, 100)
GUISetBkColor(0)
; _WinAPI_SetLayeredWindowAttributes($Form1_1, 0xabcdef, 120)
$MARGINS = DllStructCreate("int;int;int;int")
DllStructSetData($MARGINS, 1, -1)
DllCall("dwmapi.dll", "none", "DwmExtendFrameIntoClientArea", "hwnd", $Form1_1, "ptr", DllStructGetPtr($MARGINS))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While GUIGetMsg()+3
WEnd 都很不错,呵呵,学习学习 回复 3# 3mile
恩,透明了,不过还是不明白我是哪里出了什么问题,按了您的改了以后,字体颜色好怪啊,怎么改成普通的黑色。。。 回复 5# yanjerry9133
黑色?窗体背景设置成黑色的了,如果字体再设置成黑色,会被DWM过滤掉的.
不如把字体设置成白色会自然很多. 留坐..............
页:
[1]