809
社区成员
发帖
与我相关
我的任务
分享
Option Explicit
Private Sub Form_Click()
Me.ScaleMode = 3
Const size = 80 '尺寸常量,自己调
Dim i As Double, j As Double
For i = 0 To Me.ScaleWidth
For j = 0 To Me.ScaleHeight
If (i < Me.ScaleWidth / 2 + 20 And i > Me.ScaleWidth * 1 / 5 And Abs(j + 30 - Me.ScaleHeight / 2) < 3) Then Me.PSet (i, j), vbRed
If ((i - Me.ScaleWidth / 2) / size) ^ 2 + ((-j + Me.ScaleHeight / 2) / size - ((i - Me.ScaleWidth / 2) / size) ^ 2 ^ 0.3) ^ 2 - 1 <= 0.1 Then Me.PSet (i, j), vbRed
If ((i - Me.ScaleWidth / 2 - 20) / size) ^ 2 + ((-j + Me.ScaleHeight / 2) / size - ((i - Me.ScaleWidth / 2 - 20) / size) ^ 2 ^ 0.3) ^ 2 - 1 <= 0.1 Then Me.PSet (i, j), vbBlue
If (i > Me.ScaleWidth / 2 + 20 And i < Me.ScaleWidth * 4 / 5 And Abs(j + 30 - Me.ScaleHeight / 2) < 3) Then Me.PSet (i, j), vbRed
If ((j - Me.ScaleHeight / 2 + 30) / (size / 10)) ^ 2 + ((-i + Me.ScaleWidth / 2 + Me.ScaleWidth * 0.3) / (size / 10) - ((j - Me.ScaleHeight / 2 + 30) / (size / 10)) ^ 2 ^ 0.3) ^ 2 - 1 <= 0.1 Then Me.PSet (i, j), vbRed
If ((j - Me.ScaleHeight / 2 + 30) / (size / 10)) ^ 2 + ((-i + Me.ScaleWidth / 2 - Me.ScaleWidth * 0.3) / (size / 10) - ((j - Me.ScaleHeight / 2 + 30) / (size / 10)) ^ 2 ^ 0.3) ^ 2 - 1 <= 0.1 Then Me.PSet (i, j), vbRed
If ((j - Me.ScaleHeight / 2 + 30) / (size / 10)) ^ 2 + ((-i + Me.ScaleWidth / 2 - Me.ScaleWidth * 0.29) / (size / 10) - ((j - Me.ScaleHeight / 2 + 30) / (size / 10)) ^ 2 ^ 0.3) ^ 2 - 1 <= 0.1 Then Me.PSet (i, j), vbRed
If ((j - Me.ScaleHeight / 2 + 30) / (size / 10)) ^ 2 + ((-i + Me.ScaleWidth / 2 - Me.ScaleWidth * 0.28) / (size / 10) - ((j - Me.ScaleHeight / 2 + 30) / (size / 10)) ^ 2 ^ 0.3) ^ 2 - 1 <= 0.1 Then Me.PSet (i, j), vbRed
If ((j - Me.ScaleHeight / 2 + 30) / (size / 10)) ^ 2 + ((-i + Me.ScaleWidth / 2 - Me.ScaleWidth * 0.27) / (size / 10) - ((j - Me.ScaleHeight / 2 + 30) / (size / 10)) ^ 2 ^ 0.3) ^ 2 - 1 <= 0.1 Then Me.PSet (i, j), vbRed
If ((j - Me.ScaleHeight / 2 + 30) / (size / 10)) ^ 2 + ((-i + Me.ScaleWidth / 2 - Me.ScaleWidth * 0.26) / (size / 10) - ((j - Me.ScaleHeight / 2 + 30) / (size / 10)) ^ 2 ^ 0.3) ^ 2 - 1 <= 0.1 Then Me.PSet (i, j), vbRed
Next
Next
End Sub
Option Explicit
Private Sub Form_Click()
Me.ScaleMode = 3
Const size = 80 '尺寸常量,自己调
Dim i As Double, j As Double
For i = 0 To Me.ScaleWidth
For j = 0 To Me.ScaleHeight
If ((i - Me.ScaleWidth / 2) / size) ^ 2 + ((-j + Me.ScaleHeight / 2) / size - ((i - Me.ScaleWidth / 2) / size) ^ 2 ^ 0.3) ^ 2 - 1 <= 0.1 Then Me.PSet (i, j), vbRed
Next
Next
End Sub