The easyiest and most modifiable way to change a forms shape, instead of the boring windows square.
The easyiest and most modifiable way to change a forms shape, instead of the boring windows square.
API Declarations
'______________________________________________
'|//Please Visit: http://getdownloads.s5.com\\|'
Rate The easyiest and most modifiable way to change a forms shape, instead of the boring windows square.
(1(1 Vote))
Private Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Private mRegion As Long
Public Sub MakeTreeShaped()
Dim new_shape() As POINTAPI
ReDim new_shape(0 To 11) As POINTAPI
'\\ Start at top...
'_____________________
'| |_
' \_____________________| This module is for makeing the form <<-This shape
Dim i
With frm_PBar7
new_shape(i).x = 0: new_shape(i).y = 0: i = i + 1
new_shape(i).x = (.Width / 15) - 16: new_shape(i).y = 0: i = i + 1
new_shape(i).x = (.Width / 15) - 16: new_shape(i).y = 16: i = i + 1
new_shape(i).x = (.Width / 15): new_shape(i).y = 16: i = i + 1
new_shape(i).x = (.Width / 15): new_shape(i).y = (.Height / 15): i = i + 1
new_shape(i).x = 16: new_shape(i).y = (.Height / 15): i = i + 1
new_shape(i).x = 0: new_shape(i).y = (.Height / 15) - 16: i = i + 1
End With
'\\ Create this polygon region
mRegion = CreatePolygonRgn(new_shape(0), 12, 1)
Dim lret As Long
lret = SetWindowRgn(frm_PBar7.hwnd, mRegion, True)
End Sub
The easyiest and most modifiable way to change a forms shape, instead of the boring windows square. Comments
No comments yet — be the first to post one!
Post a Comment