|
-
Oct 27th, 2003, 10:03 AM
#1
Thread Starter
Addicted Member
Shape Control
I couldn't find shape control anywhere. Any help or alternate. I used to have a rectangle with blunted edges (Fillet) in VB.
Thanks
-
Oct 27th, 2003, 11:44 AM
#2
Addicted Member
You're going to have to use the GDI+ Graphics class. There's a lot of example code out there.
-
Oct 27th, 2003, 01:10 PM
#3
So Unbanned
You want the RoundRect API.
-
Oct 30th, 2003, 11:18 AM
#4
Thread Starter
Addicted Member
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
-
Oct 30th, 2003, 04:02 PM
#5
So Unbanned
Wouldn't that function be recursive?
You need to declare the API.
-
Oct 30th, 2003, 04:28 PM
#6
Originally posted by DiGiTaIErRoR
Wouldn't that function be recursive?
Looks like an infinate loop 
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
-
Oct 30th, 2003, 04:33 PM
#7
Thread Starter
Addicted Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|