| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 568 人关注过本帖
标题:我弄了个窗体透明,但是会穿透的,请大神看下怎么使窗体透明而又不穿透。
取消只看楼主 加入收藏
mrye
Rank: 2
等 级:论坛游民
帖 子:14
专家分:36
注 册:2013-3-21
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:1 
我弄了个窗体透明,但是会穿透的,请大神看下怎么使窗体透明而又不穿透。
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As long

Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long



Private Sub Form_Load()

Me.BackColor = &HF0000

Dim r As Long

BorderStyler = 0

r = GetWindowLong(hwnd, -20)

r = r Or &H80000

SetWindowLong hwnd, -20, r

SetLayeredWindowAttributes hwnd, &HFF0000, 0, &H1
搜索更多相关主题的帖子: 透明 
2013-03-24 15:20
mrye
Rank: 2
等 级:论坛游民
帖 子:14
专家分:36
注 册:2013-3-21
收藏
得分:0 
回复 3楼 lowxiong
谢谢斑竹了
2013-03-29 11:51
快速回复:我弄了个窗体透明,但是会穿透的,请大神看下怎么使窗体透明而又不穿透 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015504 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved