将Form的BorderStyle属性设为0,然后写上如下代码:
Private Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As LongPrivate Declare Function CreateRoundRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Dim outrgn As Long
Private Sub rgnform(ByVal frmbox As Form, ByVal fw As Long, ByVal fh As Long)
Dim w As Long, h As Long
w = frmbox.ScaleX(frmbox.Width, vbTwips, vbPixels)
h = frmbox.ScaleY(frmbox.Height, vbTwips, vbPixels)
outrgn = CreateRoundRectRgn(0, 0, w, h, fw, fh)
Call SetWindowRgn(frmbox.hwnd, outrgn, True)
End Sub
Private Sub Form_Load()
Call rgnform(Me, 25, 25)
End Sub
Private Sub Form_Unload(Cancel As Integer)
DeleteObject outrgn
End Sub
参考:http://www.mirll.com/portal.php?mod=view&aid=59
win11好用。
一、流利性
根据进程测试,win11在单线程、多线程、渲染、3DMark运行等方面都比win10流畅。但是目前win11的响应速度还是比较慢,很多时候点击后需要等待一段时间。
二、游戏
在各种3D大作的测试中,win11的性能略好于win10,平均帧率也高于win10。但是win11目前优化较差,内存和CPU的消耗远高于win10。
三、 *** 作
win11重做了界面,所有窗口和对话框都使用圆角窗口。根据消息,win11也会删除控制面板功能,所有的设置功能都可以在系统设置中实现。全新的桌面ui、任务栏中心、无平铺的开始菜单、全新的右键菜单都需要用户亲身体验才能了解。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)