


下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、Private Sub Command1_Click( xe = CInt(Text1 ye = CInt(Text2 If xe >= 0 And ye >= 0 Then Picture1.ForeColor = vbBlack Picture1.DrawWidth = 2 Picture1.Line (50, 5500-(50, 500 Picture1.Line (50, 5500-(5500, 5500 Picture1.Line (50, 500-(20, 600 Picture1.Line (50, 500-(80, 600 Picture1.Line (5400,
2、5470-(5500, 5500 Picture1.Line (5400, 5530-(5500, 5500 Picture1.CurrentX = 10 Picture1.CurrentY = 5300 Picture1.Print "(0,0" Picture1.CurrentX = 5500 Picture1.CurrentY = 5200 Picture1.Print "x" Picture1.CurrentX = 100 Picture1.CurrentY = 100 Picture1.Print "Y" For i = 1
3、 To xe Picture1.Line (50 + i * 500, 5500-(50 + i * 500, 5450 Next i For j = 1 To ye Picture1.Line (50, 5500 - j * 500-(100, 5500 - j * 500 Next j Picture1.ForeColor = vbRed Picture1.DrawWidth = 2 Picture1.Line (50, 5500-(50 + 500 * Int(Text1, 5500 - 500 * Int(Text2 ElseIf xe <= 0 And ye >= 0 T
4、hen Picture1.ForeColor = vbBlack Picture1.DrawWidth = 2 Picture1.Line (5500, 5500-(5500, 50 Picture1.Line (5500, 50-(5530, 150 Picture1.Line (5500, 50-(5470, 150 Picture1.Line (5500, 5500-(50, 5500 Picture1.Line (50, 5500-(150, 5470 Picture1.Line (50, 5500-(150, 5530 Picture1.CurrentX = 5600 Picture
5、1.CurrentY = 5400 Picture1.Print "(0,0" Picture1.CurrentX = 100 Picture1.CurrentY = 5200 Picture1.Print "-x" Picture1.CurrentX = 5600 Picture1.CurrentY = 100 Picture1.Print "Y" For i = 1 To -xe Picture1.Line (5500 - i * 500, 5500-(5500 - i * 500, 5450 Next i For j = 1 T
6、o ye Picture1.Line (5500, 5500 - j * 500-(5400, 5500 - j * 500 Next j Picture1.ForeColor = vbBlack Picture1.DrawWidth = 2 Picture1.Line (5500, 5500-(5500 + 500 * Int(Text1, 5500 - 500 * Int(Text2 ElseIf xe <= 0 And ye <= 0 Then Picture1.Line (5500, 50-(5500, 5500 Picture1.Line (5500, 5500-(553
7、0, 5400 Picture1.Line (5500, 5500-(5470, 5400 Picture1.Line (5500, 50-(50, 50 Picture1.Line (50, 50-(150, 20 Picture1.Line (50, 50-(150, 80 Picture1.CurrentX = 5600 Picture1.CurrentY = 40 Picture1.Print "(0,0" Picture1.CurrentX = 100 Picture1.CurrentY = 100 Picture1.Print "-x" Pi
8、cture1.CurrentX = 5600 Picture1.CurrentY = 5400 Picture1.Print "-Y" For i = 1 To -xe Picture1.Line (5500 - i * 500, 50-(5500 - i * 500, 100 Next i For j = 1 To -ye Picture1.Line (5500, 50 + j * 500-(5400, 50 + j * 500 Next j Picture1.ForeColor = vbBlack Picture1.DrawWidth = 2 Picture1.Line
9、 (5500, 50-(5500 + 500 * Int(Text1, 50 - 500 * Int(Text2 ElseIf xe >= 0 And ye <= 0 Then Picture1.ForeColor = vbBlack Picture1.DrawWidth = 2 Picture1.Line (50, 50-(5500, 50 Picture1.Line (5500, 50-(5400, 80 Picture1.Line (5500, 50-(5400, 20 Picture1.Line (50, 50-(50, 5500 Picture1.Line (50, 55
10、00-(20, 5400 Picture1.Line (50, 5500-(80, 5400 Picture1.CurrentX = 60 Picture1.CurrentY = 40 Picture1.Print "(0,0" Picture1.CurrentX = 5700 Picture1.CurrentY = 100 Picture1.Print "x" Picture1. CurrentX = 80 Picture1.CurrentY = 5400 Picture1.Print "-Y" For i = 1 To xe Pi
11、cture1.Line (50 + i * 500, 50-(50 + i * 500, 100 Next i Picture1.Print For j = 1 To -ye Picture1.Line (50, 50 + j * 500-(100, 50 + j * 500 Next j Picture1.ForeColor = vbBlack Picture1.DrawWidth = 2 Picture1.Line (50, 50-(50 + 500 * Int(Text1, 50 - 500 * Int(Text2 End If End Sub Private Sub Command2_
12、Click( n = Int(Text5 xi = 0 yi = 0 xe = CInt(Text1 ye = CInt(Text2 jvx = xe jvy = ye jrx = 0 jry = 0 If xe >= 0 And ye >= 0 Then For i = 1 To 2 n jrx = jrx + jvx If jrx >= 2 n Then jrx = jrx - 2 n k = 1 xi = xi + 1 End If jry = jry + jvy If jry >= 2 n Then jry = jry - 2 n m = 1 yi = yi +
13、 1 End If Picture1.ForeColor = vbGreen Picture1.DrawWidth = 2 If k = 1 And m = 1 Then Picture1.Line (50 + 500 * (xi - 1, 5500 - (yi - 1 * 500-(50 + 500 * (xi, 5500 - (yi * 500 ElseIf k = 1 And m = 0 Then Picture1.Line (50 + 500 * (xi - 1, 5500 - (yi * 500-(50 + 500 * (xi, 5500 - (yi * 500 ElseIf k =
14、 0 And m = 1 Then Picture1.Line (50 + 500 * xi, 5500 - (yi - 1 * 500-(50 + 500 * xi, 5500 - (yi * 500 End If Form8.CurrentX = 200 Form8.CurrentY = 200 + 300 * i Print "第" & i & " 步" & " jvx= " & jvx & " jrx= " & jrx & " jvy= &q
15、uot; & jvy & " jry= " & jry k = 0 m = 0 Next i ElseIf xe <= 0 And ye >= 0 Then For i = 1 To 2 n jrx = jrx + Abs(jvx If Abs(jrx >= 2 n Then jrx = Abs(jrx - 2 n k = 1 xi = xi + 1 End If jry = jry + jvy If jry >= 2 n Then jry = jry - 2 n m = 1 yi = yi + 1 End If If k =
16、 1 And m = 1 Then Picture1.Line (5500 - 500 * (xi - 1, 5500 - (yi - 1 * 500-(5500 - 500 * xi, 5500 - yi * 500 ElseIf k = 1 And m = 0 Then Picture1.Line (5500 - 500 * (xi - 1, 5500 - (yi * 500-(5500 - 500 * (xi, 5500 - (yi * 500 ElseIf k = 0 And m = 1 Then Picture1.Line (5500 - 500 * xi, 5500 - (yi -
17、 1 * 500-(5500 - 500 * xi, 5500 - (yi * 500 End If Form1.FontSize = 12 Print "第" & i & " 步" & " jvx= " & jvx & " jrx= " & jrx & " jvy= " & jvy & " jry= " & jry k = 0 m = 0 Next i ElseIf xe <= 0 And
18、 ye <= 0 Then For i = 1 To 2 n jrx = jrx + Abs(jvx If Abs(jrx >= 2 n Then jrx = Abs(jrx - 2 n k = 1 xi = xi + 1 End If jry = jry + Abs(jvy If Abs(jry >= 2 n Then jry = Abs(jry - 2 n m = 1 yi = yi + 1 End If If k = 1 And m = 1 Then Picture1.Line (5500 - 500 * (xi - 1, 50 + (yi - 1 * 500-(550
19、0 - 500 * (xi, 50 + (yi * 500 ElseIf k = 1 And m = 0 Then Picture1.Line (5500 - 500 * (xi - 1, 50 + (yi * 500-(5500 - 500 * (xi, 50 + (yi * 500 ElseIf k = 0 And m = 1 Then Picture1.Line (5500 - 500 * xi, 50 + (yi - 1 * 500-(5500 - 500 * xi, 50 + (yi * 500 End If Form1.FontSize = 12 Print "第&quo
20、t; & i & " 步" & " jvx= " & jvx & " jrx= " & jrx & " jvy= " & jvy & " jry= " & jry k = 0 m = 0 Next i Els eIf xe >= 0 And ye <= 0 Then For i = 1 To 2 n jrx = jrx + jvx If jrx >= 2 n Then jrx = jrx - 2 n k = 1 xi = xi + 1 End If jry = jry + Abs(jvy If Abs(jry >= 2 n Then jry = Abs(jry - 2 n m = 1 yi = yi + 1 End If If k = 1 And
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 合同范本橫線去掉
- 司機(jī)服務(wù)合同范本
- 人保財(cái)險(xiǎn)聘用合同范本
- 人防制作合同范本
- 食堂餐桌采購合同范本
- 農(nóng)莊合同老人安全合同范本
- 臨時(shí)工作合同范本
- 北京律師聘用合同范本
- 原告要求賠償合同范本
- 合同范本含稅
- 三年級下冊信息技術(shù)蘇科版 6.1設(shè)計(jì)數(shù)字作品第一課時(shí) 教案
- 20以內(nèi)的加法口算練習(xí)題4000題 284
- 單位工程施工進(jìn)度計(jì)劃橫道圖表
- Nikon尼康D3100中文說明書
- 2023年廣西職業(yè)院校技能大賽高職組《Python程序開發(fā)》賽項(xiàng)競賽樣題
- LY/T 3141-2024文物建筑木構(gòu)件檢測方法
- 08J907 潔凈廠房建筑構(gòu)造
- 財(cái)務(wù)管理學(xué)(第10版)課件 第1章 總論
- 2024年南京旅游職業(yè)學(xué)院單招職業(yè)適應(yīng)性測試題庫附答案
- MOOC 職業(yè)生涯開發(fā)與管理-南京郵電大學(xué) 中國大學(xué)慕課答案
- 春節(jié)的那些事作文6篇
評論
0/150
提交評論