Hide a part of the form with this easy code.
Hide a part of the form with this easy code.
Rate Hide a part of the form with this easy code.
(1(1 Vote))
Dim Result As Long
Dim Points(1 To 4) As POINTAPI
Private Sub Command2_Click()
hRgn = CreatePolygonRgn(Points(1), 4, 1)
Result = SetWindowRgn(Form1.hWnd, hRgn, True)
End Sub
Private Sub Command1_Click()
Call Polyline(Form1.hdc, Points(1), 4)
End Sub
Private Sub Command3_Click()
Result = SetWindowRgn(Form1.hWnd, 0, True)
End Sub
Private Sub Form_Load()
Points(1).X = 500
Points(1).Y = 500
Points(2).X = 0
Points(2).Y = 0
Points(3).X = 1000
Points(3).Y = 0
Points(4).X = 500
Points(4).Y = 500
End Sub
'''' paste this code in a module''''''''''''
Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As POINTAPI, _
ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, _
ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Declare Function Polyline Lib "gdi32" (ByVal hdc As Long, lpPoint As _
POINTAPI, ByVal nCount As Long) As Long
Public Type POINTAPI
X As Long
Y As Long
End Type
Hide a part of the form with this easy code. Comments
No comments yet — be the first to post one!
Post a Comment