Re: changing shape in label
pananam, insted of a lable, you should talke a look at SetWorldTransform() api & TextOut() Api
a c++ example http://www.codeproject.com/KB/cpp/oblique_txt.aspx
Re: changing shape in label
How about this... You can then place your text in that shape :)
vb Code:
Private Declare Function CreatePolygonRgn Lib "gdi32" _
(lpPoint As Any, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
Private Declare Function Polygon Lib "gdi32" _
(ByVal hdc As Long, lpPoint As Any, ByVal nCount As Long) As Long
Private Declare Function FillRgn Lib "gdi32" _
(ByVal hdc As Long, ByVal hRgn As Long, ByVal hBrush As Long) As Long
Private Declare Function GetStockObject Lib "gdi32" (ByVal nIndex As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Const ALTERNATE = 1
'~~> Constants for FillMode.
Const WINDING = 2
'~~> Constant for brush type.
Const BLACKBRUSH = 4
Private Type COORD
x As Long
y As Long
End Type
Private Sub Form_Paint()
Dim poly(1 To 4) As COORD, NumCoords As Long, hBrush As Long, hRgn As Long
Me.Cls
'~~> Number of vertices in polygon.
NumCoords = 4
'~~> Set scalemode to pixels to set up points of triangle.
Me.ScaleMode = vbPixels
'~~> Assign values to points.
poly(1).x = 30
poly(1).y = 30
poly(2).x = 30
poly(2).y = 0
poly(3).x = 370
poly(3).y = 0
poly(4).x = 400
poly(4).y = 30
'~~> Polygon function creates unfilled polygon on screen.
'~~> Comment FillRgn statement to see results.
Polygon Me.hdc, poly(1), NumCoords
'~~> Gets stock black brush.
hBrush = GetStockObject(BLACKBRUSH)
'~~> Creates region to fill with color.
hRgn = CreatePolygonRgn(poly(1), NumCoords, ALTERNATE)
'~~> If the creation of the region was successful then color.
If hRgn Then FillRgn Me.hdc, hRgn, hBrush
DeleteObject hRgn
End Sub
Private Sub Form_Resize()
Form_Paint
End Sub
Hope this helps...