I couldn't find shape control anywhere. Any help or alternate. I used to have a rectangle with blunted edges (Fillet) in VB.
Thanks
Printable View
I couldn't find shape control anywhere. Any help or alternate. I used to have a rectangle with blunted edges (Fillet) in VB.
Thanks
You're going to have to use the GDI+ Graphics class. There's a lot of example code out there.
You want the RoundRect API.
Can you post some links for GDC or RoundRect.
I tried RoundRect, but the following (bolded) code doesn't work.
It needs hdc. But I tried even with Hande. What should I have there
VB Code:
Public Sub RoundRect(ByVal objPanel As Object, ByVal iLeft As Integer, ByVal iRight As Integer, ByVal iTop As Integer, ByVal iBottom As Integer) Dim iEllipseWidth As Integer, iEllipseHeight As Integer ' define the rectangle's coordinates (in pixels) iLeft = 5 : iTop = 5 iRight = 75 : iBottom = 40 ' define the height and width of the ellipse to draw the rounded(rectangle) iEllipseWidth = 10 : iEllipseHeight = 10 ' draw the rounded rectangle RoundRect([b]objPanel.hdc[/b], iLeft, iTop, iRight, iBottom, iEllipseWidth, iEllipseHeight) End Sub
Wouldn't that function be recursive?
You need to declare the API.
Looks like an infinate loop :pQuote:
Originally posted by DiGiTaIErRoR
Wouldn't that function be recursive?
The current sub takes in arguements, then ignores their contents and replaces them with other arguments, and then calls itself with the arguments just created.
ack! lol
Fixed that recursive thing. But doesn't do anything in the panel.
I used the following link and somehow got it done on my form.
http://vbforums.com/showthread.php?s...ight=RoundRect