📄 2+
字号:
VERSION 5.00
Begin VB.Form Form1
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
Caption = " THE ""DJ-CHARLY"" LINE BASED IMAGE GENERATOR !!"
ClientHeight = 6795
ClientLeft = 45
ClientTop = 330
ClientWidth = 9480
Icon = "Dj-image.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 119.856
ScaleMode = 6 'Millimeter
ScaleWidth = 167.217
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "Let's fun.."
Height = 375
Left = 120
TabIndex = 1
Top = 120
Width = 975
End
Begin VB.PictureBox Picture1
AutoRedraw = -1 'True
BackColor = &H00000040&
DrawWidth = 3
ForeColor = &H00FFFFFF&
Height = 6615
Left = 75
Picture = "Dj-image.frx":0CCA
ScaleHeight = 6555
ScaleWidth = 9195
TabIndex = 0
Top = 120
Width = 9255
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim ang As Variant
Dim x1 As Variant, y1 As Variant, x2 As Variant, y2 As Variant
Dim q As Integer
Dim lados As Integer
Const Lads = 70
y1 = Picture1.ScaleHeight / 2
x1 = Picture1.ScaleWidth / 2
y2 = Picture1.ScaleHeight / 2
x2 = Picture1.ScaleWidth / 2
Picture1.Cls
ang = ((360 / Lads) / (180 / 3.14))
For q = 0 To 25210 Step 10
Picture1.Cls
ang = ((q / Lads) / (180 / 3.14))
y1 = Picture1.ScaleHeight / 2
x1 = Picture1.ScaleWidth / 2
y2 = Picture1.ScaleHeight / 2
x2 = Picture1.ScaleWidth / 2
For lados = 1 To Lads
x1 = x1 + ((Sin(ang) * lados) * 30)
y1 = y1 + ((Cos(ang) * lados) * 30)
ang = ((q / Lads) / (180 / 3.14)) * lados + 5
x2 = x2 + ((Sin(ang) * lados) * 30)
y2 = y2 + ((Cos(ang) * lados) * 30)
Picture1.Line (x1, y1)-(x2, y2), RGB(255 / Lads * lados, 0, 0)
ang = ((q / Lads) / (180 / 3.14)) * lados - 5
Next
Picture1.Refresh
DoEvents
Next
MsgBox "Isn't great", vbQuestion
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -