| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1624 人关注过本帖
标题:[开源]不規則圖片窗體的實現````
取消只看楼主 加入收藏
学习VB才2天
Rank: 5Rank: 5
等 级:贵宾
威 望:16
帖 子:1653
专家分:0
注 册:2006-5-4
收藏
 问题点数:0 回复次数:4 
[开源]不規則圖片窗體的實現````

設置一下FORM的圖片````就是伱要的不規則窗體````如果有透明GIF的話...傚果更好````

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 Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Const WS_EX_LAYERED = &H80000
Const GWL_EXSTYLE = (-20)
Const LWA_ALPHA = &H2
Const LWA_COLORKEY = &H1
Const HWND_TOPMOST = -1
Const SWP_NOMOVE = &H2
Const SWP_NOSIZE = &H1

Private Sub Form_Load()
Me.BackColor = RGB(88, 88, 88)
SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
Dim rtn As Long
Me.BorderStyle = 0
Me.Caption = ""
Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2
rtn = GetWindowLong(hWnd, GWL_EXSTYLE)
rtn = rtn Or WS_EX_LAYERED
SetWindowLong hWnd, GWL_EXSTYLE, rtn
SetLayeredWindowAttributes hWnd, RGB(88, 88, 88), 0, LWA_COLORKEY
End Sub

Private Sub Image1_Click()
End
End Sub






KOoS5Zda.rar (143.4 KB) [开源]不規則圖片窗體的實現````


[此贴子已经被作者于2006-12-26 11:24:43编辑过]



KmdIGaUR.rar (247.39 KB) [开源]不規則圖片窗體的實現````

搜索更多相关主题的帖子: 开源 
2006-12-26 10:52
学习VB才2天
Rank: 5Rank: 5
等 级:贵宾
威 望:16
帖 子:1653
专家分:0
注 册:2006-5-4
收藏
得分:0 
剛纔錯叻```現在弄成GIF叻```看看傚果吧```

[GLOW=255,DeepPink,3]我的免费网盘[/GLOW]
2006-12-26 11:24
学习VB才2天
Rank: 5Rank: 5
等 级:贵宾
威 望:16
帖 子:1653
专家分:0
注 册:2006-5-4
收藏
得分:0 
真想把WIN98 的user32.dll覆蓋叻````

[GLOW=255,DeepPink,3]我的免费网盘[/GLOW]
2006-12-26 11:32
学习VB才2天
Rank: 5Rank: 5
等 级:贵宾
威 望:16
帖 子:1653
专家分:0
注 册:2006-5-4
收藏
得分:0 
不繫吧`````連管理員都驚動叻```

[GLOW=255,DeepPink,3]我的免费网盘[/GLOW]
2006-12-26 15:48
学习VB才2天
Rank: 5Rank: 5
等 级:贵宾
威 望:16
帖 子:1653
专家分:0
注 册:2006-5-4
收藏
得分:0 

再弄一個上來````


4qaenXnS.rar (213.8 KB) [开源]不規則圖片窗體的實現````



[GLOW=255,DeepPink,3]我的免费网盘[/GLOW]
2006-12-26 22:09
快速回复:[开源]不規則圖片窗體的實現````
数据加载中...
 
   



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

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