網路城邦
回本城市首頁 唐老鴨之家
市長:  副市長:
加入本城市推薦本城市加入我的最愛訂閱最新文章
udn城市資訊科技網路分享【唐老鴨之家】城市/討論區/
討論區VB6 字體:
上一個討論主題 回文章列表 下一個討論主題
畫中華民國國旗的VB程式(本人原創)
 瀏覽759|回應0推薦0


等級:6
留言加入好友
Private Sub Form_Load()

AutoRedraw = True
BorderStyle = 0
Top = 0
Left = 0
Width = Screen.Width
Height = Screen.Height
r1 = Width / 6
r2 = Width / 12
ww = Width / 4
hh = Height / 4

Rem draw the red block
Line (0, 0)-(Width, Height), RGB(255, 0, 0), BF

Rem draw the blue block
Line (0, 0)-(Width / 2, Height / 2), RGB(0, 0, 255), BF

Rem draw the 12 light
DrawWidth = 2
For j = 0 To 30
r1 = r1 - 4 * j
r2 = r2 - 4 * j
For i = 1 To 12
theta = i * 6.283 / 12
X1 = ww + r1 * Cos(theta)
Y1 = hh + r1 * Sin(theta)
X2 = ww + r2 * Cos(theta + 6.283 / 24)
Y2 = hh + r2 * Sin(theta + 6.283 / 24)
X3 = ww + r1 * Cos(theta + 6.283 / 12)
Y3 = hh + r1 * Sin(theta + 6.283 / 12)
Line (X1, Y1)-(X2, Y2), RGB(255, 255, 255)
Line (X2, Y2)-(X3, Y3), RGB(255, 255, 255)
Next i
Next j

Rem draw the circle
FillColor = RGB(255, 255, 255)
FillStyle = 0
DrawWidth = Width / 1200
Circle (ww, hh), hh / 2, RGB(0, 0, 255)

End Sub

本文於 修改第 1 次
回應 回應給此人 推薦文章 列印 加入我的文摘

引用
引用網址:https://city.udn.com/forum/trackback.jsp?no=58536&aid=4316133