VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Draw a diamond with 3D feel

by Ahamed Aslam (2 Submissions)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 14th March 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Draw a diamond with 3D feel

API Declarations


property to 1000 and type the following in code window
dim t(8) as integer
dim x as integer
dim y as integer



Rate Draw a diamond with 3D feel



x=form1.width/2
y=form1.height/2
k=0
for i=0 to 7
t(i)=k
k=k+80
next
end sub
private sum timer1_timer()
k=0
for i=0 to 7
k=i+1
if k>7 then k=0
line(x+1500*sin(t(i)*3.1415/180),y+1500*cos(t(i)*3.1415/180))-(x+1500*sin(t(k)*3.1415/180),y+1500*cos(t(k)*3.1415/180)),backcolor
next
for i=0 to 7
line(x,y+2000)-(x+1500*sin(t(i)*3.1415/180),y+1500*cos(t(i)*3.1415/180)),backcolor
line(x,y-1500)-(x+1500*sin(t(i)*3.1415/180),y+1500*cos(t(i)*3.1415/180)),backcolor
t(i)=t(i)+2
next
k=0
for i=0 to 7
k=i+1
if k>7 then k=0
line(x+1500*sin(t(i)*3.1415/180),y+1500*cos(t(i)*3.1415/180))-(x+1500*sin(t(k)*3.1415/180),y+1500*cos(t(k)*3.1415/180)),vbred
next
for i=0 to 7
line(x,y+2000)-(x+1500*sin(t(i)*3.1415/180),y+1500*cos(t(i)*3.1415/180)),vbred
line(x,y-1500)-(x+1500*sin(t(i)*3.1415/180),y+1500*cos(t(i)*3.1415/180)),vbred
t(i)=t(i)+2
next
end sub


Download this snippet    Add to My Saved Code

Draw a diamond with 3D feel Comments

No comments have been posted about Draw a diamond with 3D feel. Why not be the first to post a comment about Draw a diamond with 3D feel.

Post your comment

Subject:
Message:
0/1000 characters