主题:[枒蹦]VB 6 写 大富翁
What's Wrong ?
[quote]
Private Sub Form_Activate()
Form1.FillStyle = 0
Form1.FillColor = vbBlue
Form1.Width = (800 * 10) + (1000 * 2) + Form.Width - Form1.ScaleWidth
Form1.Height = (800 * 7) + (100 * 2) + Form1.Height - Form1.ScaleHeight
Line (0, 0)-(1000, 1000), , B
Line ((800 * 10) + 1000, 0)-((800 * 7) + 2 * 1000, 1000), , B
Line (0, (800 * 10) + 1000)-(1000, (800 * 7) + 2 * 1000), , B
Line ((800 * 10) + 1000, (800 * 7) + 1000)-((800 * 7) + 2 * 1000, (800 * 10) + 2 * 1000), , B
For i = 0 To 5
If i = 0 Or i = 3 Or i = 5 Then
Form1.FillColor = &HFFFF00
If i = 1 Then
Form1.FillColor = &HE0E0E0
If i = 2 Then
Form1.FillColor = vbGreen
If i = 4 Then
Form1.FillColor = vbRed
Line ((800 * i) + 1000, (800 * 7) + 1000)-((800 * (i + 1)) + 1000, (800 * 10 + 2 * 1000)), , B
Line ((800 * 10) + 1000, 1000 + (800 * i))-((800 * 7) + 2 * 1000, 1000 + (800 * (i + 1))), , B
Line (1000 + (800 * i), 0)-(1000 + (800 * (i + 1)), 1000), , B
Line (0, 1000 + (800 * i))-(1000, 1000 + (800 * (i + 1))), , B
Next
End Sub
[/quote]
[quote]
Private Sub Form_Activate()
Form1.FillStyle = 0
Form1.FillColor = vbBlue
Form1.Width = (800 * 10) + (1000 * 2) + Form.Width - Form1.ScaleWidth
Form1.Height = (800 * 7) + (100 * 2) + Form1.Height - Form1.ScaleHeight
Line (0, 0)-(1000, 1000), , B
Line ((800 * 10) + 1000, 0)-((800 * 7) + 2 * 1000, 1000), , B
Line (0, (800 * 10) + 1000)-(1000, (800 * 7) + 2 * 1000), , B
Line ((800 * 10) + 1000, (800 * 7) + 1000)-((800 * 7) + 2 * 1000, (800 * 10) + 2 * 1000), , B
For i = 0 To 5
If i = 0 Or i = 3 Or i = 5 Then
Form1.FillColor = &HFFFF00
If i = 1 Then
Form1.FillColor = &HE0E0E0
If i = 2 Then
Form1.FillColor = vbGreen
If i = 4 Then
Form1.FillColor = vbRed
Line ((800 * i) + 1000, (800 * 7) + 1000)-((800 * (i + 1)) + 1000, (800 * 10 + 2 * 1000)), , B
Line ((800 * 10) + 1000, 1000 + (800 * i))-((800 * 7) + 2 * 1000, 1000 + (800 * (i + 1))), , B
Line (1000 + (800 * i), 0)-(1000 + (800 * (i + 1)), 1000), , B
Line (0, 1000 + (800 * i))-(1000, 1000 + (800 * (i + 1))), , B
Next
End Sub
[/quote]