如題
ex :
輸入 \"5\"
表單上 出現 7個 顏色\"隨機變化\" 的 5 邊形
2006-04-25 17:54:26 · 4 個解答 · 發問者 佳君 5 in 電腦與網際網路 ➔ 程式設計
http://e.blog.xuite.net/e/f/c/3/14398818/blog_206163/txt/6132606/0.jpg
此圖 左邊: 5邊形 右邊: 9邊形
2006-04-25 18:07:27 · update #1
N 的範圍 3 ~20 (包含3)
2006-04-25 18:08:33 · update #2
http://i3.tinypic.com/wiab61.jpg
2006-04-26 12:25:49 · update #3
無法顯示網頁
2006-04-29 01:02:09 補充:
'懶的寫註解,你自己研究吧!XDPrivate Type Point X As Long Y As LongEnd TypeConst Pi = 3.14159265358979Dim r%, B(6) As PointPrivate Sub Command1_Click()Dim I%, J%, X%, W#, N%, A() As Point, S$, T%Do N = Int(Val(InputBox("請輸入邊數3~20")))Loop Until N > 2 And N < 21ReDim A(1 To N)W = 360 / N: S = ",": AutoRedraw = True: ClsFor X = 0 To 6 W = 360 / N For I = 1 To N A(I).X = B(X).X - Sin(W / 180 * Pi) * r A(I).Y = B(X).Y + Cos(W / 180 * Pi) * r W = W + 360 / N Next Randomize Do T = Int(Rnd * 16) Loop Until InStr(S, "," & CStr(T) & ",") = 0 S = S & CStr(T) & "," Me.ForeColor = QBColor(T) For I = 1 To N For J = 1 To N If I <> J Then Line (A(I).X, A(I).Y)-(A(J).X, A(J).Y) Next NextNextAutoRedraw = FalseEnd SubPrivate Sub Form_Load()r = 1000B(0).X = 2000: B(0).Y = 1100B(1).X = 4100: B(1).Y = 1100B(2).X = 1000: B(2).Y = 3100B(3).X = 3100: B(3).Y = 3100B(4).X = 5200: B(4).Y = 3100B(5).X = 2000: B(5).Y = 5100B(6).X = 4100: B(6).Y = 5100End Sub
2006-04-28 21:02:09 · answer #1 · answered by W.J.S. 7 · 0⤊ 0⤋
手機刪除line照片不見真的難過
這家案例夠多,手機記憶體內外都可以,也沒限什麼牌子三星,HTC,SONY都可以,不過要等的比較久才知道原來要分析不是換零件哪麼簡單,心急吃不了熱豆腐,http://www.datahelp.com.tw
htt[://www.data1.com.tw
2015-03-21 03:13:13 · answer #2 · answered by 張宜天 1 · 0⤊ 0⤋
討論VB的家族:http://tw.club.yahoo.com/clubs/veryhandsomeboy/
2006-05-02 19:53:28 · answer #3 · answered by 天使 4 · 0⤊ 0⤋
我自己有寫一個程式~~裡面有畫N邊形的........ 我呼叫API畫n邊形
要的話再寄信
不過要有點報酬~~~~~~~不用說應該知道吧
2006-04-26 12:43:54 · answer #4 · answered by XXXPKMOTO 3 · 0⤊ 0⤋