{"id":1744,"date":"2024-08-30T08:00:00","date_gmt":"2024-08-30T00:00:00","guid":{"rendered":"http:\/\/www.wyrcad.com\/?p=1744"},"modified":"2024-08-26T15:43:27","modified_gmt":"2024-08-26T07:43:27","slug":"%e8%ae%be%e7%bd%ae%e7%aa%97%e4%bd%93%e5%bd%a2%e7%8a%b6","status":"publish","type":"post","link":"https:\/\/www.wyrcad.com\/?p=1744","title":{"rendered":"\u8bbe\u7f6e\u7a97\u4f53\u5f62\u72b6"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.wyrcad.com\/?p=1572\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"425\" src=\"https:\/\/www.wyrcad.com\/wp-content\/uploads\/2024\/08\/Shape.bmp\" alt=\"\" class=\"wp-image-1758\"\/><\/a><\/figure>\n\n\n\n<p>Option Explicit<br>Public Declare Function CreateEllipticRgn Lib &#8220;GDI32&#8221; (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long<br>Public Declare Function SetWindowRgn Lib &#8220;user32&#8221; (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Long) As Long<br>Public Declare Function CreatePolygonRgn Lib &#8220;GDI32&#8221; (lpPoint As POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long<\/p>\n\n\n\n<p>Public Type POINTAPI<br>X As Long<br>Y As Long<br>End Type<\/p>\n\n\n\n<p>Public Sub RoundForm()<br>Dim hRgn As Long, lRes As Long<br>&#8216;\u5706\u5f62\u7a97\u4f53<br>hRgn = CreateEllipticRgn(30, 24, 456, 450)<br>lRes = SetWindowRgn(Me.hWnd, hRgn, True)<br>End Sub<br>Public Sub CrossForm()<br>Dim hRgn As Long, lRes As Long<br>Dim pNode() As POINTAPI<br>ReDim pNode(11) As POINTAPI<br>&#8216;\u5341\u5b57\u7a97\u4f53<br>pNode(0).X = 156<br>pNode(0).Y = 42<br>pNode(1).X = 329<br>pNode(1).Y = 42<br>pNode(2).X = 329<br>pNode(2).Y = 154<br>pNode(3).X = 439<br>pNode(3).Y = 154<br>pNode(4).X = 439<br>pNode(4).Y = 317<br>pNode(5).X = 329<br>pNode(5).Y = 317<br>pNode(6).X = 329<br>pNode(6).Y = 429<br>pNode(7).X = 156<br>pNode(7).Y = 429<br>pNode(8).X = 156<br>pNode(8).Y = 317<br>pNode(9).X = 46<br>pNode(9).Y = 317<br>pNode(10).X = 46<br>pNode(10).Y = 154<br>pNode(11).X = 156<br>pNode(11).Y = 154<br>hRgn = CreatePolygonRgn(pNode(0), 12, 2)<br>lRes = SetWindowRgn(Me.hWnd, hRgn, True)<br>End Sub<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Option ExplicitPublic Declare Function CreateEllipticRg &hellip; <a href=\"https:\/\/www.wyrcad.com\/?p=1744\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c\u8bbe\u7f6e\u7a97\u4f53\u5f62\u72b6\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[24,17],"class_list":["post-1744","post","type-post","status-publish","format-standard","hentry","category-bianchengyuandi","tag-vb","tag-biancheng"],"_links":{"self":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/1744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1744"}],"version-history":[{"count":3,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/1744\/revisions"}],"predecessor-version":[{"id":1760,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/1744\/revisions\/1760"}],"wp:attachment":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1744"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}