📄 bezier.frm
字号:
VERSION 5.00
Object = "*\A..\SOURCE\FAST2002.vbp"
Begin VB.Form frmBezier
BackColor = &H00FFFFFF&
BorderStyle = 3 'Fixed Dialog
Caption = "Bezier"
ClientHeight = 3750
ClientLeft = 3270
ClientTop = 1590
ClientWidth = 5430
DrawStyle = 2 'Dot
FillColor = &H000000FF&
Icon = "Bezier.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 3750
ScaleWidth = 5430
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin FLWGraphMath.FWGDI objGDI
Left = 480
Top = 2730
_ExtentX = 820
_ExtentY = 820
End
End
Attribute VB_Name = "frmBezier"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim objPoints As New FLWGraphMath.IFWGDIPoints
Private Sub Form_Load()
Call objGDI.Create(Me.hWnd)
Me.ScaleMode = vbPixels
objGDI.LineWidth = 2
objGDI.LineStyle = FLWGraphMath.flwBSSolid
objGDI.BackColor = vbBlue
Call objPoints.Clear
Call objPoints.Add(Me.ScaleWidth / 2, Me.ScaleHeight / 10)
Call objPoints.Add(Me.ScaleWidth / 10, Me.ScaleHeight / 2)
Call objPoints.Add(Me.ScaleWidth / 10 * 9, Me.ScaleHeight / 2)
Call objPoints.Add(Me.ScaleWidth / 2, Me.ScaleHeight / 10 * 9)
End Sub
Private Sub Form_Activate()
Call objGDI.Bezier(objPoints)
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button <> 0 Then
Call MoveCurve(Button, x, y)
End If
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Call MoveCurve(Button, x, y)
End Sub
Private Sub MoveCurve(ByVal ordButton As Integer, _
ByVal cx As Single, _
ByVal cy As Single)
objGDI.BackColor = Me.BackColor
Call objGDI.Bezier(objPoints)
Select Case ordButton
Case vbLeftButton
objPoints(2).x = cx
objPoints(2).y = cy
Case vbRightButton
objPoints(3).x = cx
objPoints(3).y = cy
End Select
objGDI.BackColor = vbBlue
Call objGDI.Bezier(objPoints)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -