标题:[求助]如何实现窗口的椭圆
取消只看楼主
redy
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-12-20
 问题点数:0 回复次数:0 
[求助]如何实现窗口的椭圆

各位兄弟姐妹帮我看看代码问题出在哪
Public Class Form1
Private Declare Function CreateRectRgn Lib "gdi32" _
( _
ByVal X1 As Long, ByVal Y1 As Long, _
ByVal X2 As Long, ByVal Y2 As Long _
) As Long
Public Declare Function CreateEllipticRgn Lib "gdi32" Alias "CreateEllipticRgn" _
(ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long

Public Declare Function SetWindowRgn Lib "user32" Alias "SetWindowRgn" _
(ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim hRgnC As Long
Dim r As Long

hRgnC = CreateEllipticRgn(5, 5, 300, 300)
'创建椭圆形区域
r = SetWindowRgn(Me.Handle.ToInt32, hRgnC, True)
'设置窗口为椭圆形

End Sub
End Class

搜索更多相关主题的帖子: 窗口 椭圆 
2006-12-24 13:43



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-111702-1-1.html




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

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