-1

我正在使用 VB6。谁能告诉我如何制作一个圆形的表格?

我已经使用了这段代码,但它显示了一个错误:

Private Declare Function CreateRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function CombineRgn Lib "gdi32" (ByVal hDestRgn As Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal nCombineMode As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Long) As Long
Private Function fMakeATranspArea(AreaType As String, pCordinate() As Long) As Boolean
4

1 回答 1

2

可能看起来也像一个 API 调用(fMakeATranspArea它不是) - 但它缺少主体,这可能是您感到困惑的问题。

你可以用这样的手册替换你的最后一行:

Private Sub Form_Load()
    SetWindowRgn Me.hWnd, CreateEllipticRgn(0, 0, 300, 300), 1
End Sub

你看到的那些数字是坐标。我不建议你修复fMakeATranspArea它,因为它看起来很复杂,而且过于复杂,你可能需要什么。

CombineRgn在这种情况下CreateRectRgn也不需要。

从外观上看,您从这里找到了源代码——它具有完整的实现:

http://www.planet-source-code.com/vb/scripts/ShowCodeAsText.asp?txtCodeId=1617&lngWId=-10

于 2013-08-18T13:22:58.613 回答