www.pudn.com > 牛顿法解方程之混沌情况1.32源代码.zip > Form1.frm
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmMain
AutoRedraw = -1 'True
BackColor = &H00C0C0C0&
Caption = "牛顿法解方程之混沌情况 1.32"
ClientHeight = 4920
ClientLeft = 6060
ClientTop = 3810
ClientWidth = 6000
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "Form1.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 4920
ScaleWidth = 6000
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text7
Height = 405
Left = 3945
TabIndex = 7
Top = 1575
Visible = 0 'False
Width = 510
End
Begin MSComDlg.CommonDialog CommonDialogBMP
Left = 1050
Top = 1410
_ExtentX = 847
_ExtentY = 847
_Version = 393216
Filter = "*.BMP|*.BMP"
End
Begin VB.Timer Timer3
Interval = 50
Left = 3450
Top = 1575
End
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 50
Left = 2820
Top = 1560
End
Begin VB.CommandButton CommandSatrt
Caption = "commandstart"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 60
TabIndex = 6
Top = 1815
Visible = 0 'False
Width = 1500
End
Begin VB.PictureBox Picture2
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1.80000e5
Left = 4785
MousePointer = 2 'Cross
ScaleHeight = 12000
ScaleMode = 3 'Pixel
ScaleWidth = 16000
TabIndex = 5
Top = 1665
Visible = 0 'False
Width = 2.40000e5
End
Begin VB.TextBox Text6
Height = 405
Left = 5025
TabIndex = 4
Text = "0"
Top = 1590
Visible = 0 'False
Width = 735
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 500
Left = 4560
Top = 1575
End
Begin VB.CommandButton Command4
Caption = "clear"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 105
TabIndex = 3
Top = 3015
Visible = 0 'False
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "Stop"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 105
TabIndex = 2
Top = 2625
Visible = 0 'False
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "Start"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 105
TabIndex = 1
Top = 2220
Visible = 0 'False
Width = 1095
End
Begin VB.PictureBox Picture1
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3810
Left = 1635
MousePointer = 2 'Cross
OLEDropMode = 1 'Manual
ScaleHeight = 254
ScaleMode = 3 'Pixel
ScaleWidth = 298
TabIndex = 0
Top = 2340
Width = 4470
Begin MSComDlg.CommonDialog CommonDialog1
Left = 3000
Top = 2760
_ExtentX = 847
_ExtentY = 847
_Version = 393216
Filter = "*.mh|*.mh|所有文件(*.*)|*.*"
End
Begin VB.Shape Shape1
BorderColor = &H00000000&
BorderStyle = 3 'Dot
Height = 1455
Left = 735
Top = 480
Visible = 0 'False
Width = 2295
End
End
Begin MSComDlg.CommonDialog CommonDialogSaveH
Left = 1590
Top = 1395
_ExtentX = 847
_ExtentY = 847
_Version = 393216
Filter = "*.HTXT|*.HTXT"
End
Begin MSComDlg.CommonDialog CommonDialogOpen
Left = 2160
Top = 1425
_ExtentX = 847
_ExtentY = 847
_Version = 393216
Filter = "*.HTXT|*.HTXT"
End
Begin VB.Image ImageLine3
Height = 330
Left = 3420
Picture = "Form1.frx":0CCA
ToolTipText = " 上一幅图像 "
Top = 1215
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageLine2
Height = 330
Left = 3420
Picture = "Form1.frx":12E4
ToolTipText = " 上一幅图像 "
Top = 840
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageLine1
Height = 330
Left = 3390
Picture = "Form1.frx":18FE
ToolTipText = " 上一幅图像 "
Top = 435
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageLine
Height = 330
Left = 3330
Picture = "Form1.frx":1F18
ToolTipText = " 绘制边框 "
Top = 15
Width = 330
End
Begin VB.Image ImagePIC3
Height = 330
Left = 4995
Picture = "Form1.frx":2532
ToolTipText = " 打开控制面板 "
Top = 1215
Visible = 0 'False
Width = 330
End
Begin VB.Image ImagePIC2
Height = 330
Left = 4980
Picture = "Form1.frx":2B4C
ToolTipText = " 打开控制面板 "
Top = 885
Visible = 0 'False
Width = 330
End
Begin VB.Image ImagePIC1
Height = 330
Left = 4950
Picture = "Form1.frx":3166
ToolTipText = " 打开控制面板 "
Top = 465
Visible = 0 'False
Width = 330
End
Begin VB.Image ImagePIC
Height = 330
Left = 4845
Picture = "Form1.frx":3780
ToolTipText = " RGB颜色调整 "
Top = 15
Width = 330
End
Begin VB.Image ImageR3
Height = 330
Left = 4515
Picture = "Form1.frx":3D9A
ToolTipText = " 打开控制面板 "
Top = 1215
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageR2
Height = 330
Left = 4500
Picture = "Form1.frx":43B4
ToolTipText = " 打开控制面板 "
Top = 870
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageR1
Height = 330
Left = 4500
Picture = "Form1.frx":49CE
ToolTipText = " 打开控制面板 "
Top = 480
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageR
Height = 330
Left = 4320
Picture = "Form1.frx":4FE8
ToolTipText = " 下一幅图像 "
Top = 15
Width = 330
End
Begin VB.Image ImageL3
Height = 330
Left = 4050
Picture = "Form1.frx":5602
ToolTipText = " 打开控制面板 "
Top = 1215
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageL2
Height = 330
Left = 4065
Picture = "Form1.frx":5C1C
ToolTipText = " 打开控制面板 "
Top = 840
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageL1
Height = 330
Left = 4020
Picture = "Form1.frx":6236
ToolTipText = " 打开控制面板 "
Top = 465
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageL
Height = 330
Left = 3960
Picture = "Form1.frx":6850
ToolTipText = " 上一幅图像 "
Top = 15
Width = 330
End
Begin VB.Image ImageO3
Height = 330
Left = 3045
Picture = "Form1.frx":6E6A
ToolTipText = " 打开控制面板 "
Top = 1215
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageO2
Height = 330
Left = 3015
Picture = "Form1.frx":7484
ToolTipText = " 打开控制面板 "
Top = 825
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageO1
Height = 330
Left = 3030
Picture = "Form1.frx":7A9E
ToolTipText = " 打开控制面板 "
Top = 465
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageO
Height = 330
Left = 2970
Picture = "Form1.frx":80B8
ToolTipText = " 缩小区域 "
Top = 15
Width = 330
End
Begin VB.Image ImageI3
Height = 330
Left = 2535
Picture = "Form1.frx":86D2
ToolTipText = " 打开控制面板 "
Top = 1215
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageI2
Height = 330
Left = 2535
Picture = "Form1.frx":8CEC
ToolTipText = " 打开控制面板 "
Top = 810
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageI1
Height = 330
Left = 2550
Picture = "Form1.frx":9306
ToolTipText = " 打开控制面板 "
Top = 435
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageI
Height = 330
Left = 2610
Picture = "Form1.frx":9920
ToolTipText = " 放大选择区域 "
Top = 15
Width = 330
End
Begin VB.Line Line1
BorderColor = &H00808080&
BorderStyle = 6 'Inside Solid
Index = 1
X1 = -180
X2 = 5384
Y1 = 375
Y2 = 375
End
Begin VB.Image ImageK3
Height = 330
Left = 1830
Picture = "Form1.frx":9F3A
Top = 1200
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageK2
Height = 330
Left = 1815
Picture = "Form1.frx":A554
Top = 810
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageK1
Height = 330
Left = 1815
Picture = "Form1.frx":AB6E
Top = 435
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageK
Height = 330
Left = 1800
Picture = "Form1.frx":B188
ToolTipText = " 打开控制面板 "
Top = 15
Width = 330
End
Begin VB.Image ImageC3
Height = 330
Left = 1125
Picture = "Form1.frx":B7A2
Top = 1200
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageC2
Height = 330
Left = 1125
Picture = "Form1.frx":BDBC
Top = 825
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageC1
Height = 330
Left = 1125
Picture = "Form1.frx":C3D6
Top = 450
Visible = 0 'False
Width = 330
End
Begin VB.Image ImageC
Height = 330
Left = 1170
Picture = "Form1.frx":C9F0
ToolTipText = " 清除画面 "
Top = 15
Width = 330
End
Begin VB.Image ImageS3
Height = 360
Left = 675
Picture = "Form1.frx":D00A
Top = 1200
Visible = 0 'False
Width = 360
End
Begin VB.Image ImageS2
Height = 360
Left = 675
Picture = "Form1.frx":D6F4
Top = 825
Visible = 0 'False
Width = 360
End
Begin VB.Image ImageS1
Height = 360
Left = 675
Picture = "Form1.frx":DDDE
Top = 450
Visible = 0 'False
Width = 360
End
Begin VB.Image ImageS
Height = 360
Left = 720
Picture = "Form1.frx":E4C8
ToolTipText = " 停止绘图 "
Top = 0
Width = 360
End
Begin VB.Image ImageP3
Height = 360
Left = 225
Picture = "Form1.frx":EBB2
Top = 1200
Visible = 0 'False
Width = 360
End
Begin VB.Image ImageP2
Height = 360
Left = 225
Picture = "Form1.frx":F29C
Top = 825
Visible = 0 'False
Width = 360
End
Begin VB.Image ImageP1
Height = 360
Left = 225
Picture = "Form1.frx":F986
Top = 450
Visible = 0 'False
Width = 360
End
Begin VB.Image ImageP
Height = 360
Left = 270
Picture = "Form1.frx":10070
ToolTipText = " 开始绘图 "
Top = 0
Width = 360
End
Begin VB.Line Line1
BorderColor = &H00FFFFFF&
BorderWidth = 2
Index = 0
X1 = -180
X2 = 5369
Y1 = 375
Y2 = 375
End
Begin VB.Menu wenjian
Caption = " 文件(&F) "
Begin VB.Menu conglai
Caption = "重来(&T)"
Shortcut = ^N
End
Begin VB.Menu hen7853
Caption = "-"
End
Begin VB.Menu dakai
Caption = "打开 HTXT 文件..."
Shortcut = ^O
End
Begin VB.Menu henidf
Caption = "-"
End
Begin VB.Menu MsaveHTXT
Caption = "保存为 HTXT 文件..."
Shortcut = ^H
End
Begin VB.Menu baocun
Caption = "保存为 BMP 文件..."
Shortcut = ^S
End
Begin VB.Menu henhgtrh
Caption = "-"
End
Begin VB.Menu SetBMPW
Caption = "设置为桌面图片"
End
Begin VB.Menu aaa
Caption = "-"
End
Begin VB.Menu colo
Caption = "颜色锁定(&C)"
End
Begin VB.Menu suiji
Caption = "随机颜色(&J)"
Checked = -1 'True
End
Begin VB.Menu hang
Caption = "-"
End
Begin VB.Menu tuichu
Caption = "退出(&X)"
End
End
Begin VB.Menu bianji
Caption = "编辑(&E)"
Begin VB.Menu Mstart
Caption = "开始绘制"
End
Begin VB.Menu Mend
Caption = "停止绘图"
End
Begin VB.Menu MClease
Caption = "清除图像"
End
Begin VB.Menu hennhgbst
Caption = "-"
End
Begin VB.Menu umCopy
Caption = "复制图像"
End
Begin VB.Menu hengjnjrege
Caption = "-"
End
Begin VB.Menu fangda2
Caption = "放大"
End
Begin VB.Menu suaoxiao1
Caption = "缩小"
End
Begin VB.Menu henfdhbg
Caption = "-"
End
Begin VB.Menu line
Caption = "绘框"
End
Begin VB.Menu hen78
Caption = "-"
End
Begin VB.Menu Mold
Caption = "上一幅图"
End
Begin VB.Menu Mnext
Caption = "下一幅图"
End
Begin VB.Menu fuzhi
Caption = "复制"
Visible = 0 'False
End
Begin VB.Menu dak
Caption = "打开"
Visible = 0 'False
End
Begin VB.Menu baoc
Caption = "保存"
Visible = 0 'False
End
End
Begin VB.Menu objectH
Caption = " 选项(&O) "
Begin VB.Menu colorH
Caption = "颜色渐变参数"
Begin VB.Menu JianbianA1
Caption = "渐变a增强"
Shortcut = ^{F1}
End
Begin VB.Menu JianbianA2
Caption = "渐变a减弱"
Shortcut = ^{F2}
End
End
Begin VB.Menu HENJNTET
Caption = "-"
End
Begin VB.Menu OnTop
Caption = "程序位于顶层"
End
Begin VB.Menu henbf
Caption = "-"
End
Begin VB.Menu emRGBedit
Caption = "RGB颜色调整..."
End
Begin VB.Menu henybf543w
Caption = "-"
End
Begin VB.Menu picM
Caption = "图片属性设置..."
End
Begin VB.Menu henlkjfd
Caption = "-"
End
Begin VB.Menu concleH
Caption = "控制台(&S)..."
End
End
Begin VB.Menu bangzhu
Caption = " 帮助(&H) "
Begin VB.Menu guanyu
Caption = "关于程序(&A)..."
End
Begin VB.Menu hen87543
Caption = "-"
End
Begin VB.Menu tuxiang
Caption = "关于图象(&P)..."
Shortcut = {F1}
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public picX As Long, picY As Long '实际绘图尺寸
Public Mang As Double '防止同时运行多个本线程的代码
Public Msx0 As Single, Msy0 As Single '记录开始拖动时的鼠标位置
Public Msx1 As Single, Msy1 As Single '记录拖动时的鼠标位置
Private Sub baoc_Click()
'调用保存功能 ( *.BMP 文件)
Call baocun_Click
End Sub
Private Sub colo_Click()
'锁定颜色参数
SeData(0, 5) = 0
colo.Checked = True: suiji.Checked = False
End Sub
'+++++++++++++重要的一个绘图过程+++++++++++++
Private Sub CommandSatrt_Click()
'具体执行绘制操作的过程
Dim i As Long
'临时用变量 temp
Dim temp As Long, tempA As Double, temp1 As Double, temp2 As Double, temp3 As Double, temp4 As Double, temp5 As Double
Dim x1 As Double, y1 As Double, x2 As Double, y2 As Double '记录坐标范围
Dim M As Long, nM As Long '最大迭代次数;最小迭代次数
Dim Tmang As Double '防止同时运行多个本线程的代码
Dim Se1 As Long, Se2 As Long, Se3 As Long, se As Long '记录颜色的变量
Dim A As Long, B As Long, N As Long '从中间开始向两边绘制时使用的变量
Dim x0 As Double, y0 As Double '复平面上的一个点
Dim Kn2 As Single '颜色渐变强度调节参数
Dim Hssx As Double '用来保存返回的函数的一项性质,用作颜色函数的参数,(下同 )
Dim Hssy As Double
Dim dL1 As Double
Dim dL2 As Double
Dim dL3 As Double
Dim dL4 As Double
'------------------------------------------------------------
On Error Resume Next '出错时继续执行
picX = Picture2.ScaleWidth: picY = Picture2.ScaleHeight '绘图显示尺寸
x1 = SeData(0, 1): y1 = SeData(0, 2) '坐标范围
x2 = SeData(0, 3): y2 = SeData(0, 4)
Tmang = Timer '防止同时运行多个本线程的代码
Mang = Tmang '防止同时运行多个本线程的代码
For i = 1 To 1000
DoEvents '转让控制权,以便让操作系统处理其它的事件(包括再次调用本过程)
Next i
Se1 = SeData(0, 6): Se2 = SeData(0, 7): Se3 = SeData(0, 8) '调色参数
A = picX / 2 '从中间开始向两边绘制
temp1 = -1: temp2 = -1
For N = 0 To frmMain.Picture2.ScaleWidth + 1
A = A - (((N / 1) Mod 2) * 2 - 1) * N '总体上从中间向两边绘制
For B = 0 To frmMain.Picture2.ScaleHeight '从上到下绘制
If Mang <> Tmang Then '========
Mang = -1 '本线程执行时让 Mang = Tmang,当 Mang <> Tmang 时
Exit Sub '表明该线程应该停止。(其他地方类同)
End If '========
x0 = (x2 - x1) * A / picX + x1: y0 = (y2 - y1) * B / picY + y1 '获得复平面上的一个点
If x0 = 0 Then x0 = 1E-150 '最好不要有(0,0)点
If y0 = 0 Then y0 = 1E-150
'特效处理(4重),原理是对(x0,y0)点进行某种变换,使点映射得一个新的复表面上
For i = 3 To 0 Step -1
Select Case Int(SeData(0, 16) / (100# ^ i)) Mod 100#
Case 0
'无
Case 1 '圆
temp1 = Sqr(x0 ^ 2 + y0 ^ 2)
temp2 = ZArg(y0, x0, 0)
temp3 = Int(temp1)
If temp3 <> 1 Then
temp1 = temp1 - temp3
x0 = Sgn(temp1) * (Sqr(2 * temp1 * temp1 / (1 - temp1 * temp1)) + temp1)
y0 = temp2
Else
x0 = temp1
y0 = 45 / 180 * PI
End If
temp1 = x0
temp2 = y0
x0 = temp1 * Cos(temp2)
y0 = temp1 * Sin(temp2)
Case 2 '加倍
temp1 = x0 ^ 2 - y0 ^ 2
temp2 = 2 * x0 * y0
x0 = temp1
y0 = temp2
Case 3 '平铺
temp1 = Tan(x0 / 1.5)
temp2 = Tan(y0)
x0 = temp1
y0 = temp2
Case 4 '网
temp1 = Sin(x0 * 2 + y0 * 2)
temp2 = Cos(x0 * 2 - y0 * 2)
x0 = temp1
y0 = temp2
Case 5 '黎曼面
temp1 = Sqr(x0 * x0 + y0 * y0)
temp2 = ZArg(x0, y0, 0)
temp1 = Tan(temp1 * 1.5) * 2
x0 = temp1 * Sin(temp2)
y0 = temp1 * Cos(temp2)
Case 6 '1/c
Call Zshang(1, 0, x0, y0, temp1, temp2)
x0 = temp1
y0 = temp2
Case 7 'Mandelbrot
Call fz2(x0 - 0.5, y0, x0 - 0.5, y0, temp1, temp2, 4)
x0 = temp1
y0 = temp2
End Select
Next i
'颜色方案处理原理
' RGB(256 - ((x1 Mod 512) - 256), _
256 - ((x2 Mod 512) - 256), _
256 - ((x3 Mod 512) - 256)) _
程序中这样可以保持颜色的渐变
'这样更好: RGB(255 - ((x1 Mod 511) - 255), _
255 - ((x2 Mod 511) - 255), _
255 - ((x3 Mod 511) - 255)) _
'
se = RGB(SeData(0, 6), SeData(0, 7), SeData(0, 8)) '默认颜色
'
Select Case SeData(0, 19) + 1 '颜色方案 (其中有的效果有上面使用的特效处理方式,特效独立出来是由伍胜富先生提出的)
Case 1
M = 10000
nM = 11
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = SeData(0, 9) + 10
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (M - i) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (M - i) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (M - i) * 2 ^ Kn2 / M) Mod 512 - 256))
Case 2
M = 3
nM = 1
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * ((Log(Abs(Hssy))) * 2 ^ Kn2)) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * ((Log(dL1))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * ((Log(Abs(Hssx)))) * 2 ^ Kn2) Mod 512 - 256))
Case 3
M = 3
nM = 1
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9) + 5) / 2
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * Log(dL1) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (Abs(Cos(Hssx))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (Abs(Cos(Hssy))) * 2 ^ Kn2) Mod 512 - 256))
Case 4
M = 3
nM = 1
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((dL1 / Hssx))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * ((Tan(Hssy) / (dL1))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * ((Hssx / Hssy)) * 2 ^ Kn2) Mod 512 - 256))
Case 5
temp1 = Sqr(x0 ^ 2 + y0 ^ 2)
temp2 = ZArg(y0, x0, 0)
temp3 = Int(temp1)
If temp3 <> 1 Then
temp1 = temp1 - temp3
x0 = Sgn(temp1) * (Sqr(2 * temp1 * temp1 / (1 - temp1 * temp1)) + temp1)
y0 = temp2
Else
x0 = temp1
y0 = 45 / 180 * PI
End If
temp1 = x0
temp2 = y0
x0 = temp1 * Cos(temp2)
y0 = temp1 * Sin(temp2)
M = 1000
nM = 15
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
dL2 = dL2
Kn2 = SeData(0, 9) + 10
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (Sin(Log(1 / i) + Log(Abs(dL2)))) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (Cos(Log(1 / i) + Log(Abs(dL2)))) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (Sin(Log(1 / i) + Log(Abs(dL2)))) * 2 ^ Kn2 / M) Mod 512 - 256))
Case 6
M = 3
nM = 1
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2
se = RGB(66, _
124, _
221)
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (Log((Log(Abs(Hssy))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (Log((Log(dL1)))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (Log((Log(Abs(Hssx))))) * 2 ^ Kn2) Mod 512 - 256))
Case 7
M = 13
nM = 11
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 1.5
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((Log(Abs(Hssx ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (((Log((dL2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (((Log(Abs(Hssy ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256))
Case 8
M = 4
nM = 2
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 1.5
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((Log(Abs((Hssx) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (((Log((dL2 * 100 + Hssy + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (((Log(Abs((Hssy) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256))
Case 9
M = 5
nM = 3
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 1.5
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((Log(Abs((Hssx + Hssy) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (((Log((dL2 * 100 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (((Log(Abs((Hssx + Hssy) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256))
Case 10
M = 4
nM = 3
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 1
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((Log(Abs((Hssy / Hssx) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (((Log((dL2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (((Log(Abs((Hssx + Hssy) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256))
Case 11
M = 22
nM = 20
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 1
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((Cos(Log(Abs((Hssy) + 0.000001)))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * ((Log((dL2 / dL1 * Hssx * Hssy + 0.000001)))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * ((Cos(Log(Abs((Hssx) + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256))
Case 12
M = 14
nM = 13
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 1
temp1 = Atn(((Hssy / Hssx))) + dL2
temp2 = Atn(((Hssx / Hssy))) - dL2
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (Abs(temp1)) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * Log(Abs(Atn(Log(Abs(Sin(dL2) * Sin(Hssx) + Cos(Hssy)))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (Abs(temp2) - Abs(temp1)) * 2 ^ Kn2) Mod 512 - 256))
Case 13
M = 10
nM = 9
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 + 3
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * Log(Abs(Sin(Cos(dL3)))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * Log(Abs(Cos(Sin(dL3)))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * Log(Abs(Sin(dL3))) * 2 ^ Kn2) Mod 512 - 256))
Case 14
M = 1000
nM = 1
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 + 3
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * Log(Abs(Sin(Cos(Log(dL4))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * Log(Abs(Cos(Sin(Log(dL4))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * Log(Abs(Sin(Log(dL4)))) * 2 ^ Kn2) Mod 512 - 256))
Case 15
temp1 = x0 ^ 2 - y0 ^ 2
temp2 = 2 * x0 * y0
x0 = temp1
y0 = temp2
temp1 = x0 ^ 2 - y0 ^ 2
temp2 = 2 * x0 * y0
x0 = temp1
y0 = temp2
M = 23
nM = 21
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 3.5
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((Log(Abs(Hssx ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (((10 * Log((dL2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (((Log(Abs(Hssy ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256))
Case 16
M = 1000
nM = 11
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = SeData(0, 9) + 12
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (Sin(M - i / 1000# + Log(Abs(dL2) + Log(Abs(dL1))))) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (Cos(M - i / 1000# + Log(Abs(dL2) + Log(Abs(dL3))))) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (Sin(M - i / 1000# + (Abs(dL2)))) * 2 ^ Kn2 / M) Mod 512 - 256))
Case 17
M = 1000
nM = 11
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = SeData(0, 9) + 9
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (Log(dL1 + 0.001 * dL2)) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (Log(dL1 + 0.001 * dL2)) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (Log(dL2 + 0.001 * dL2)) * 2 ^ Kn2 / M) Mod 512 - 256))
Case 18
temp1 = x0 ^ 2 - y0 ^ 2
temp2 = 2 * x0 * y0
x0 = temp1
y0 = temp2
temp1 = Sin(x0)
temp2 = Sin(y0)
x0 = temp1
y0 = temp2
M = 23
nM = 21
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 3.5
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((Log(Abs(Hssx ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (((10 * Log((dL2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (((Log(Abs(Hssy ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256))
Case 19
M = 1000
nM = 11
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = SeData(0, 9) + 9
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * Tan(Abs(Log(Log(dL2 + dL3) + Sin(Log(dL1 + dL3))))) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * Tan(Abs(Log(Log(dL2 + dL3) + Sin(Log(dL1 + dL3))))) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * Tan(Abs(Log(Log(dL2 + dL3) + Sin(Log(dL1 + dL3))))) * 2 ^ Kn2 / M) Mod 512 - 256))
Case 20
temp1 = x0 ^ 2 - y0 ^ 2
temp2 = 2 * x0 * y0
x0 = temp1
y0 = temp2
M = 5
nM = 3
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 1#
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((Log(Abs((Hssx + Hssy) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (((Log((dL2 * 100 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (((Log(Abs((Hssx + Hssy) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256))
Case 21
M = 1000
nM = 15
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = SeData(0, 9) + 10
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (Sin(Log(1 / i) + Log(Abs(dL2)))) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (Cos(Log(1 / i) + Log(Abs(dL2)))) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (Sin(Log(1 / i) + Log(Abs(dL2)))) * 2 ^ Kn2 / M) Mod 512 - 256))
Case 22
M = 1000
nM = 15
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = SeData(0, 9) + 10
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (Sin(Log(10 / i) + Log(Abs(Log(Abs(dL2)))))) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (Cos(Log(10 / i) + Log(Abs(Log(Abs(dL2)))))) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (Sin(Log(10 / i) + Log(Abs(Log(Abs(dL2)))))) * 2 ^ Kn2 / M) Mod 512 - 256))
Case 23
temp1 = (x0 ^ 2) - (y0 ^ 2)
temp2 = 2 * x0 * y0
x0 = temp1
y0 = temp2
Call Zshang(0.7, 0, x0, y0, temp1, temp2)
x0 = temp1
y0 = temp2
M = 1000
nM = 30
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = SeData(0, 9) + 10
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (Sin(Log(100 / i) + Sin(Abs(Log(Abs(dL2)))))) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (Cos(Log(100 / i) + Sin(Abs(Log(Abs(dL2)))))) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (Sin(Log(100 / i) + Cos(Abs(Log(Abs(dL2)))))) * 2 ^ Kn2 / M) Mod 512 - 256))
Case 24
M = 1000
nM = 30
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = SeData(0, 9) + 10
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (Sin(Log(100 / i) + 1 / (Sin(Abs(Log(Abs(dL2))))))) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (Cos(Log(100 / i) + 1 / (Sin(Abs(Log(Abs(dL2))))))) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (Sin(Log(100 / i) + 1 / (Cos(Abs(Log(Abs(dL2))))))) * 2 ^ Kn2 / M) Mod 512 - 256))
Case 25
M = 1000
nM = 10
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = SeData(0, 9) + 11
temp1 = Tan(Abs(Sin(Abs(Log(Abs(dL4))))))
temp2 = Tan(Abs(Sin(Abs(Log(Abs(dL2))))))
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (Sin(Log(100 / i) + temp1)) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (Cos(Log(100 / i) + temp2)) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (Sin(Log(100 / i) + temp1)) * 2 ^ Kn2 / M) Mod 512 - 256))
Case 26
M = 1000
nM = 30
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = SeData(0, 9) + 11
temp1 = Tan(Abs(Sin(Abs(Log(Abs(dL4))))))
temp2 = Tan(Abs(Sin(Abs(Log(Abs(dL2))))))
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (Sin(Log(100 / i) + temp1)) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (Cos(Log(100 / i) + temp2)) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (Sin(Log(100 / i) + temp1)) * 2 ^ Kn2 / M) Mod 512 - 256))
Case 27
temp1 = (x0 ^ 2) - (y0 ^ 2)
temp2 = 2 * x0 * y0
x0 = temp1
y0 = temp2
Call Zshang(0.7, 0, x0, y0, temp1, temp2)
x0 = temp1
y0 = temp2
M = 5
nM = 3
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 1
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((Log(Abs((Hssy / Hssx) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (((Log((dL2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (((Log(Abs((Hssx + Hssy) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256))
Case 28
temp1 = x0 ^ 2 - y0 ^ 2
temp2 = 2 * x0 * y0
x0 = temp1
y0 = temp2
temp1 = x0 ^ 2 - y0 ^ 2
temp2 = 2 * x0 * y0
x0 = temp1
y0 = temp2
M = 4
nM = 2
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 1.5
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((Log(Abs((Hssx) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (((Log((dL2 * 100 + Hssy + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (((Log(Abs((Hssy) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256))
Case 29
temp1 = Tan(x0 / 1.5)
temp2 = Tan(y0)
x0 = temp1
y0 = temp2
M = 13
nM = 11
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 1.5
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((Log(Abs(Hssy ^ 2.5 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (((Log((dL2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (((Log(Abs(Hssx ^ 2.5 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256))
Case 30
temp1 = x0 ^ 2 - y0 ^ 2
temp2 = 2 * x0 * y0
x0 = temp1
y0 = temp2
M = 23
nM = 21
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 3.5
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((Log(Abs(Hssx ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (((3 * Log((dL2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (((Log(Abs(Hssy ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256))
Case 31
Call fz2(x0, y0, 0, 1, temp1, temp2, 2)
x0 = temp1
y0 = temp2
temp1 = x0 ^ 2 - y0 ^ 2
temp2 = 2 * x0 * y0
x0 = temp1
y0 = temp2
temp1 = x0 ^ 2 - y0 ^ 2
temp2 = 2 * x0 * y0
x0 = temp1
y0 = temp2
M = 5
nM = 3
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 1#
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((Log(Abs((Hssx + Hssy) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (((Log((dL2 * 100 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (((Log(Abs((Hssx + Hssy) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256))
Case 32
Call fz2(y0, x0, 0.3, 0.3, temp1, temp2, 4)
x0 = temp1
y0 = temp2
temp1 = x0 ^ 2 - y0 ^ 2
temp2 = 2 * x0 * y0
x0 = temp1
y0 = temp2
temp1 = x0 ^ 2 - y0 ^ 2
temp2 = 2 * x0 * y0
x0 = temp1
y0 = temp2
M = 4
nM = 2
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = (SeData(0, 9)) / 2 - 1.5
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (((Log(Abs((Hssx) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (((Log((dL2 * 100 + Hssy + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (((Log(Abs((Hssy) ^ 2 + 0.000001))))) * 2 ^ Kn2) Mod 512 - 256))
Case Else
M = 10000
nM = 11
i = MMi(x0, y0, Int(SeData(0, 13)), M, nM, Hssx, Hssy, dL1, dL2, dL3, dL4) 'i
Kn2 = SeData(0, 9) + 11.5
se = RGB(256 - Abs(Abs(Se1 - (2 * Se2 - 256) * (M - i) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se2 - (2 * Se3 - 256) * (M - i) * 2 ^ Kn2 / M) Mod 512 - 256), _
256 - Abs(Abs(Se3 - (2 * Se1 - 256) * (M - i) * 2 ^ Kn2 / M) Mod 512 - 256))
End Select
If Mang <> Tmang Then '防止同时运行多个本线程的代码
Mang = -1
Exit Sub
End If
temp = SetPixelV(frmMain.Picture2.hdc, A, B, se)
'因为单独的绘图操作占整个显示图像的时间比很少,所以这里没有做优化, _
但用API的函数还是比VB自带的快很多倍,(SetPixelV比SetPixel快)
Next B
DoEvents
If Mang <> Tmang Then '防止同时运行多个本线程的代码
Mang = -1
Exit Sub
End If
'Picture2保存绘制的图像(实际的图形),Picture1用来显示,以下代码实现显示,并尽量减少绘图操作。
tempA = Int(A * frmMain.Picture1.ScaleWidth / frmMain.Picture2.ScaleWidth)
If (tempA <> temp1 And tempA <> temp2) Then
temp2 = temp1: temp1 = tempA
frmMain.Picture1.PaintPicture frmMain.Picture2.Image, _
tempA, _
0, _
Int(1# * frmMain.Picture1.ScaleWidth / frmMain.Picture2.ScaleWidth + 0.999999999999), _
frmMain.Picture1.ScaleHeight, _
A, _
0, _
1, _
frmMain.Picture2.ScaleHeight, _
&HCC0020
Else
tempA = -1
End If
Next N
'整幅图像全部刷新显示
frmMain.Picture1.PaintPicture frmMain.Picture2.Image, 0, 0, _
frmMain.Picture1.ScaleWidth, frmMain.Picture1.ScaleHeight, _
0, _
0, frmMain.Picture2.ScaleWidth, _
frmMain.Picture2.ScaleHeight, &HCC0020
frmMain.Picture1.Refresh
End Sub
Private Sub concleH_Click()
'显示“参数控制面板”前的准备
frmCtrl.Text1.Text = Str(SeData(0, 1))
frmCtrl.Text2.Text = Str(SeData(0, 2))
frmCtrl.Text3.Text = Str(SeData(0, 3))
frmCtrl.Text4.Text = Str(SeData(0, 4))
If SeData(0, 5) = 1 Then
frmCtrl.Option2.Value = True
Else
frmCtrl.Option3.Value = True
End If
frmCtrl.Text13.Text = Str(SeData(0, 6))
frmCtrl.Text15.Text = Str(SeData(0, 7))
frmCtrl.Text16.Text = Str(SeData(0, 8))
frmCtrl.Text29.Text = Str(SeData(0, 9))
frmCtrl.Text30.Text = Str(SeData(0, 10))
frmCtrl.Text31.Text = Str(SeData(0, 11))
frmCtrl.Text17.Text = Str(SeData(0, 12))
If SeData(0, 13) = 1 Then
frmCtrl.Option4.Value = True
ElseIf SeData(0, 13) = 2 Then
frmCtrl.Option5.Value = True
ElseIf SeData(0, 13) = 3 Then
frmCtrl.Option1.Value = True
End If
frmCtrl.Text14.Text = Str(SeData(0, 14))
frmCtrl.Text21.Text = Str(SeData(0, 15))
'frmCtrl.Text22.Text = Str(SeData(0, 16))
frmCtrl.Combo1.ListIndex = Int(SeData(0, 16) / 1) Mod 100#
frmCtrl.Combo2.ListIndex = Int(SeData(0, 16) / 100) Mod 100#
frmCtrl.Combo3.ListIndex = Int(SeData(0, 16) / 10000) Mod 100#
frmCtrl.Combo4.ListIndex = Int(SeData(0, 16) / 1000000) Mod 100#
frmCtrl.Text23.Text = Str(SeData(0, 17))
frmCtrl.Text24.Text = Str(SeData(0, 18))
frmCtrl.OptionZheSe(SeData(0, 19)).Value = True
If frmMain.OnTop.Checked = True Then
'因为主窗口有可能为顶层窗口,所以先取消主窗口为顶层窗口(其它地方不再赘述)
Call SetWindowPos(Me.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or _
SWP_NOSIZE Or SWP_NOACTIVATE)
End If
'使要显示的窗口始终位于屏幕中心,当然StartUpPosition属性可以设置窗口初始位置
frmCtrl.Left = Abs(frmMain.Left + (frmMain.Width - frmCtrl.Width) / 2)
frmCtrl.Top = Abs(frmMain.Top + (frmMain.Height - frmCtrl.Height) / 2)
'界面处理
If SeData(0, 5) = 1 Then
frmCtrl.HScroll1.Enabled = False
frmCtrl.HScroll2.Enabled = False
frmCtrl.HScroll3.Enabled = False
frmCtrl.Text13.Enabled = False
frmCtrl.Text15.Enabled = False
frmCtrl.Text16.Enabled = False
Else
frmCtrl.HScroll1.Enabled = True
frmCtrl.HScroll2.Enabled = True
frmCtrl.HScroll3.Enabled = True
frmCtrl.Text13.Enabled = True
frmCtrl.Text15.Enabled = True
frmCtrl.Text16.Enabled = True
End If
If SeData(0, 13) = 1 Then
frmCtrl.Text14.Enabled = True
frmCtrl.Text21.Enabled = False
frmCtrl.Text23.Enabled = False
frmCtrl.Text24.Enabled = False
frmCtrl.Label12.Enabled = False
frmCtrl.Label15.Enabled = False
frmCtrl.Label16.Enabled = False
ElseIf SeData(0, 13) = 2 Then
frmCtrl.Text14.Enabled = False
frmCtrl.Text21.Enabled = False
frmCtrl.Text23.Enabled = False
frmCtrl.Text24.Enabled = False
frmCtrl.Label12.Enabled = False
frmCtrl.Label15.Enabled = False
frmCtrl.Label16.Enabled = False
Else
frmCtrl.Text14.Enabled = False
frmCtrl.Text21.Enabled = True
frmCtrl.Text23.Enabled = True
frmCtrl.Text24.Enabled = True
frmCtrl.Label12.Enabled = True
frmCtrl.Label15.Enabled = True
frmCtrl.Label16.Enabled = True
End If
frmCtrl.Show 1
If frmMain.OnTop.Checked = True Then
'设主窗口为顶层窗口
Call SetWindowPos(Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or _
SWP_NOSIZE Or SWP_NOACTIVATE)
End If
End Sub
Private Sub emRGBedit_Click()
'调用以打开RGB调整窗口
Call ImagePIC_Click
End Sub
Private Sub Form_Click()
'界面控制
Shape1.Visible = False
End Sub
'+++++++++++程序启动和重要参数说明++++++++++++
Private Sub Form_Load()
'主程序启动过程
Dim i As Long
Dim x1 As Double, strX As String
Randomize Timer '利用Timer值的不确定性,使产生的“随机数”真正“随机”
'设置默认参数值
frmMain.Picture2.Width = 15
frmMain.Picture2.Height = 15
picX = Picture1.ScaleWidth: picY = Picture1.ScaleHeight
'SeData(-2 To 20, 0 To 19)
PSeData = 0
For i = -2 To 20
SeData(i, 0) = 0
Next i
SeData(0, 0) = 1 '标志
SeData(0, 1) = 2 '坐标 X1
SeData(0, 2) = 1.5 '坐标 y1
SeData(0, 3) = -2 '坐标 X2
SeData(0, 4) = -1.5 '坐标 y2
SeData(0, 5) = 1 '颜色 是否随机
SeData(0, 6) = 150 '颜色 R
SeData(0, 7) = 250 '颜色 G
SeData(0, 8) = 50 '颜色 B
SeData(0, 9) = 0 '颜色 渐变参数a
SeData(0, 10) = 0 '颜色 渐变参数b (没有用到)
SeData(0, 11) = 0 '颜色 渐变参数c (没有用到)
SeData(0, 12) = 0 '颜色 渐变参数d (没有用到)
SeData(0, 13) = 2 '选定的函数编号
SeData(0, 14) = 5 'X^N-1=0 中的 N值
SeData(0, 15) = 3 'Z*(1+Z^A)/(1-Z^A)=R 中的 A
SeData(0, 16) = 0 '特效编号
SeData(0, 17) = 0 'Z*(1+Z^A)/(1-Z^A)=R 中的 R的实部
SeData(0, 18) = -3 'Z*(1+Z^A)/(1-Z^A)=R 中的 R的虚部
SeData(0, 19) = 6 '着色方案编号
frmCtrl.Hide
frmMain.Left = (Screen.Width - frmMain.Width) / 2
frmMain.Top = (Screen.Height - frmMain.Height) / 2.5
frmMain.Show
DoEvents
'检查命令行参数,若是 *.HTXT 文件 则打开
strX = UCase(Command)
If Len(strX) >= 5 Then
'文件名称中有可能在前后加上双引号("),有的时候就去掉
If Len(strX) >= 2 Then
If Left(strX, 1) = """" And Right(strX, 1) = """" Then
strX = Left(strX, Len(strX) - 1)
strX = Right(strX, Len(strX) - 1)
Else
strX = (strX + "T")
End If
End If
On Error GoTo aaa: '出错处理
If (Right(strX, 5)) = ".HTXT" Then
Open strX For Input As #1
For i = 0 To 19
Input #1, x1
SeData(0, i) = x1
Next i
Close #1
End If
End If
'刷新显示
frmMain.Picture1.PaintPicture frmMain.Picture2.Image, 0, 0, _
frmMain.Picture1.ScaleWidth, frmMain.Picture1.ScaleHeight, _
0, _
0, frmMain.Picture2.ScaleWidth, _
frmMain.Picture2.ScaleHeight, &HCC0020
'调用开始绘图
Call Command1_Click
Exit Sub
aaa: '错误处理
Close #1
MsgBox " 打开文件时出错 (或者其它错误) ! ", vbOKOnly, " 错误"
End Sub
Private Sub baocun_Click()
'保存为 *.BMP 文件
Dim fileName As String
On Error GoTo aaa:
CommonDialogBMP.fileName = ""
CommonDialogBMP.ShowSave
If CommonDialogBMP.fileName = "" Then Exit Sub
If (Dir(CommonDialogBMP.fileName)) <> "" Then
If MsgBox(" 文件已经存在,要覆盖吗? ", vbOKCancel, "文件重名") <> vbOK Then Exit Sub
End If
fileName = CommonDialogBMP.fileName
SavePicture frmMain.Picture2.Image, fileName '保存图片为 *.BMP
Exit Sub
aaa:
MsgBox " 文件名错误 (或者其它) ! ", vbOKOnly, " 错误"
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
'退出程序处理
Mang = Timer ' 停止绘图
DoEvents
End
End Sub
Private Sub line_Click()
'调用绘框过程
Call ImageLine_Click
End Sub
Private Sub MClease_Click()
'调用清除显示的过程
Call ImageC_Click
End Sub
Private Sub Mend_Click()
'调用停止绘图过程
Call ImageS_Click
End Sub
Private Sub Mnext_Click()
'载入下一幅图形参数
Call ImageR_Click
End Sub
Private Sub Mold_Click()
'载入上一幅图形参数
Call ImageL_Click
End Sub
Private Sub MsaveHTXT_Click()
'保存为 *.HTXT 文件
Dim x1 As Double, i As Long
On Error GoTo aaa:
CommonDialogSaveH.fileName = ""
CommonDialogSaveH.ShowSave
If Me.CommonDialogSaveH.fileName = "" Then Exit Sub
If (Dir(CommonDialogSaveH.fileName)) <> "" Then
If MsgBox(" 文件已经存在,要覆盖吗? ", vbOKCancel, "文件重名") <> vbOK Then Exit Sub
End If
Open CommonDialogSaveH.fileName For Output As #1
For i = 0 To 19
SeData(-1, i) = SeData(0, i) '获得现在的参数值
Next i
SeData(-1, 0) = 1
SeData(-1, 5) = 0
For i = 0 To 19
Write #1, SeData(-1, i) '将现在的参数值写入文件
Next i
Close #1
Exit Sub
aaa:
Close #1
MsgBox " 保存文件时出错 (或者其它错误) ! ", vbOKOnly, " 错误"
End Sub
Private Sub Mstart_Click()
Call ImageP_Click
End Sub
Private Sub OnTop_Click()
'程序始终位于顶层切换
If OnTop.Checked = False Then
OnTop.Checked = True
'设置窗口位于顶层
Call SetWindowPos(Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or _
SWP_NOSIZE Or SWP_NOACTIVATE)
Else
OnTop.Checked = False
'取消窗口位于顶层
Call SetWindowPos(Me.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or _
SWP_NOSIZE Or SWP_NOACTIVATE)
End If
End Sub
Private Sub Picture1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
'支持拖放操作的代码
Dim x1 As Double, i As Long, FName As String
On Error GoTo aaa:
FName = Data.Files(1) '获取一个文件名称(当拖放的是文件时)
Data.Files.Clear
Mang = Timer
If FName = "" Then Exit Sub
Me.Text7.Text = UCase(FName) '保存文件名称
DoEvents
Me.Timer2.Enabled = True
'这里是为了实现多线程处理方式, _
把要实现的代码放到Timer2_Timer()中,Me.Text7.Text保存了要打开的文件名称, _
Timer2_Timer()执行时首先将自己的Enable设为False以保证只执行一次。 _
(要不然会出现很多问题,当然也还有其他很好的解决方案)
Exit Sub
aaa:
Close #1
Call SeDataOUT
MsgBox " 打开文件时出错 (或者其它错误) ! ", vbOKOnly, " 错误"
End Sub
Private Sub SetBMPW_Click()
'设置图片为桌面
SetWallPaper Me.Picture2
End Sub
Private Sub suiji_Click()
'颜色参数随机
SeData(0, 5) = 1
colo.Checked = False: suiji.Checked = True
End Sub
Private Sub Timer2_Timer()
'这里是为了实现多线程处理方式, _
把要实现的代码放到Timer2_Timer()中,Me.Text7.Text保存了要打开的文件名称, _
Timer2_Timer()执行时首先将自己的Enable设为False以保证只执行一次。 _
(要不然会出现很多问题,当然也还有其他很好的解决方案)
Dim FName As String, i As Long, x1 As Double
DoEvents
Me.Timer2.Enabled = False
On Error GoTo aaa:
FName = UCase(Text7.Text) 'Me.Text7.Text保存了要打开的文件名称
Text7.Text = ""
If FName <> "" Then
On Error GoTo aaa: '出错处理
If (Right(FName, 5)) = ".HTXT" Then
Call SeDataIN
Open FName For Input As #1
For i = 0 To 19
Input #1, x1 '从文件读入参数值
SeData(0, i) = x1
Next i
SeData(0, 0) = 1
SeData(0, 5) = 0
Close #1
Else
Me.Picture2.AutoSize = True
Me.Picture2.Picture = LoadPicture(FName)
Call Form_Resize
Me.Picture2.AutoSize = False
Exit Sub
End If
Picture2.Cls
Picture1.Cls
Mang = Timer
DoEvents
Call Command1_Click
DoEvents
End If
Exit Sub
aaa:
Close #1
Call SeDataOUT
End Sub
Private Sub Timer3_Timer()
'使程序不至于占用全部的CPU, :)
Sleep (10)
End Sub
Private Sub umCopy_Click()
'复制图像到剪贴板
Clipboard.Clear
Clipboard.SetData Me.Picture2.Image
End Sub
Private Sub wenjian_Click()
'显示当前颜色是否随机
If SeData(0, 5) = 1 Then
colo.Checked = False: suiji.Checked = True
Else
colo.Checked = True: suiji.Checked = False
End If
Me.Refresh
DoEvents
End Sub
Public Sub Command1_Click()
'+++++++++++++完成两次绘图调用+++++++++++++++
Dim x1, x2, y1, y2 As Double
Dim msg As Long
Dim Se1, Se2, Se3 As Long
x1 = SeData(0, 1): y1 = SeData(0, 2) '
x2 = SeData(0, 3): y2 = SeData(0, 4)
If y1 = y2 Or x1 = x2 Then
msg = MsgBox(" 已经不能放大(或者数据有误) ! ", vbOKOnly, " 错误")
Exit Sub
End If
If SeData(0, 5) = 1 Then
'颜色随机
Randomize Timer
Se1 = Int(Rnd * 255 + 1): Se2 = Int(Rnd * 255 + 1): Se3 = Int(Rnd * 255 + 1)
SeDataIN
SeData(0, 6) = Se1: SeData(0, 7) = Se2: SeData(0, 8) = Se3
SeData(0, 5) = 1
Else
'颜色固定
Se1 = SeData(0, 6): Se2 = SeData(0, 7): Se3 = SeData(0, 8)
End If
frmMain.Picture1.Refresh
frmMain.Picture2.Width = frmMain.Picture1.Width / 5
frmMain.Picture2.Height = frmMain.Picture1.Height / 5
frmMain.Picture2.Cls
frmMain.Picture2.PaintPicture frmMain.Picture1.Image, 0, 0, _
frmMain.Picture2.ScaleWidth, frmMain.Picture2.ScaleHeight, _
0, _
0, frmMain.Picture1.ScaleWidth, _
frmMain.Picture1.ScaleHeight, &HCC0020
Call CommandSatrt_Click '绘制粗略图形
If frmPicSize.Option1.Value = True Then
frmMain.Picture2.Width = frmMain.Picture1.Width
frmMain.Picture2.Height = frmMain.Picture1.Height
Else
frmMain.Picture2.Width = frmPicSize.f4picw * 15
frmMain.Picture2.Height = frmPicSize.f4pich * 15
End If
If Mang = -1 Then '防止不必要的绘制
Mang = 0
Exit Sub
End If
frmMain.Picture2.PaintPicture frmMain.Picture1.Image, 0, 0, _
frmMain.Picture2.ScaleWidth, frmMain.Picture2.ScaleHeight, _
0, _
0, frmMain.Picture1.ScaleWidth, _
frmMain.Picture1.ScaleHeight, &HCC0020
Call CommandSatrt_Click '绘制精细图形
End Sub
Private Sub Command2_Click()
'停止绘图 Mang 变化以后绘图操作将自动结束
Mang = Timer
End Sub
Private Sub Command4_Click()
'清除图像
Picture2.Cls
Picture1.Cls
End Sub
Private Sub conglai_Click()
'重来,参数设为默认值
Call SeDataIN
SeData(0, 1) = 2
SeData(0, 2) = 1.5
SeData(0, 3) = -2
SeData(0, 4) = -1.5
SeData(0, 4) = -1.5
SeData(0, 9) = 0
SeData(0, 10) = 0
SeData(0, 11) = 0
SeData(0, 12) = 0
Picture1.Cls
Call Command1_Click
End Sub
Private Sub dak_Click()
'打开 *.HTXT 文件,并开始绘制
Call dakai_Click
End Sub
Private Sub dakai_Click()
'打开 *.HTXT 文件,并开始绘制
Dim x1 As Double, i As Long
On Error GoTo aaa:
CommonDialogOpen.fileName = ""
CommonDialogOpen.ShowOpen
If Me.CommonDialogOpen.fileName = "" Then Exit Sub
Call SeDataIN
Open CommonDialogOpen.fileName For Input As #1
For i = 0 To 19
Input #1, x1
SeData(0, i) = x1
Next i
SeData(0, 0) = 1
SeData(0, 5) = 0
Close #1
Picture2.Cls
Picture1.Cls
Call Command1_Click
Exit Sub
aaa:
Close #1
Call SeDataOUT
MsgBox " 打开文件时出错 (或者其它错误) ! ", vbOKOnly, " 错误"
End Sub
Private Sub fangda2_Click()
'放大选中区域
Call ImageI_Click
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageP.Picture = Me.ImageP1.Picture
Me.ImageS.Picture = Me.ImageS1.Picture
Me.ImageC.Picture = Me.ImageC1.Picture
Me.ImageK.Picture = Me.ImageK1.Picture
Me.ImageI.Picture = Me.ImageI1.Picture
Me.ImageO.Picture = Me.ImageO1.Picture
Me.ImageL.Picture = Me.ImageL1.Picture
Me.ImageR.Picture = Me.ImageR1.Picture
Me.ImagePIC.Picture = Me.ImagePIC1.Picture
Me.ImageLine.Picture = Me.ImageLine1.Picture
End Sub
Public Sub Form_Resize()
'窗体尺寸改变时重新显示图像
On Error GoTo aaa:
Me.Line1(0).x1 = 0
Me.Line1(0).x2 = Me.Width
Me.Line1(1).x1 = 0
Me.Line1(1).x2 = Me.Width
Picture1.Left = 0
Picture1.Top = Me.Line1(0).y1 + 3 * 15
Picture1.Width = Me.ScaleWidth
Picture1.Height = Me.ScaleHeight - Picture1.Top
frmMain.Picture1.PaintPicture frmMain.Picture2.Image, 0, 0, _
frmMain.Picture1.ScaleWidth, frmMain.Picture1.ScaleHeight, _
0, _
0, frmMain.Picture2.ScaleWidth, _
frmMain.Picture2.ScaleHeight, &HCC0020
Exit Sub
aaa:
End Sub
Private Sub guanyu_Click()
'关于 窗口
If frmMain.OnTop.Checked = True Then
'因为主窗口有可能为顶层窗口,所以先取消主窗口为顶层窗口(其它地方不再赘述)
Call SetWindowPos(Me.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or _
SWP_NOSIZE Or SWP_NOACTIVATE)
End If
frmAbout.Left = Abs(frmMain.Left + (frmMain.Width - frmAbout.Width) / 2)
frmAbout.Top = Abs(frmMain.Top + (frmMain.Height - frmAbout.Height) / 2)
frmAbout.Show 1
If frmMain.OnTop.Checked = True Then
Call SetWindowPos(Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or _
SWP_NOSIZE Or SWP_NOACTIVATE)
End If
End Sub
Private Sub ImageI_Click()
'放大选中区域
Dim x1, y1, x2, y2 As Double
If Me.Shape1.Visible = True Then
Call SeDataIN
PSeData = 0
'Shape1.Visible = False
'得到新的坐标值
x1 = SeData(1, 1) + (SeData(1, 3) - SeData(1, 1)) * Me.Shape1.Left * 15 / Me.Picture1.Width
y1 = SeData(1, 2) + (SeData(1, 4) - SeData(1, 2)) * Me.Shape1.Top * 15 / Me.Picture1.Height
x2 = SeData(1, 1) + (SeData(1, 3) - SeData(1, 1)) * (Me.Shape1.Left + Me.Shape1.Width) * 15 / Me.Picture1.Width
y2 = SeData(1, 2) + (SeData(1, 4) - SeData(1, 2)) * (Me.Shape1.Top + Me.Shape1.Height) * 15 / Me.Picture1.Height
SeData(0, 1) = x1
SeData(0, 2) = y1
SeData(0, 3) = x2
SeData(0, 4) = y2
SeData(0, 5) = 0 '颜色锁定
Call Command1_Click
End If
End Sub
Private Sub ImageI_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageI.Picture = Me.ImageI3.Picture
End Sub
Private Sub ImageI_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageP.Picture = Me.ImageP1.Picture
Me.ImageS.Picture = Me.ImageS1.Picture
Me.ImageC.Picture = Me.ImageC1.Picture
Me.ImageK.Picture = Me.ImageK1.Picture
Me.ImageI.Picture = Me.ImageI2.Picture
Me.ImageO.Picture = Me.ImageO1.Picture
Me.ImageL.Picture = Me.ImageL1.Picture
Me.ImageR.Picture = Me.ImageR1.Picture
Me.ImagePIC.Picture = Me.ImagePIC1.Picture
Me.ImageLine.Picture = Me.ImageLine1.Picture
End Sub
Private Sub ImageI_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageI.Picture = Me.ImageI2.Picture
End Sub
Private Sub ImageL_Click()
'载入上一幅图形参数
Dim i As Integer
Shape1.Visible = False
If PSeData = 0 Then
If SeData(1, 0) = 0 Then Exit Sub
Call SeDataIN
PSeData = 2
For i = 0 To 19
SeData(0, i) = SeData(PSeData, i)
Next i
Call Command1_Click
ElseIf PSeData < 19 And PSeData > 0 Then
If SeData(PSeData + 1, 0) = 0 Then Exit Sub
PSeData = PSeData + 1
For i = 0 To 19
SeData(0, i) = SeData(PSeData, i)
Next i
Call Command1_Click
End If
End Sub
Private Sub ImageL_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageL.Picture = Me.ImageL3.Picture
End Sub
Private Sub ImageL_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageP.Picture = Me.ImageP1.Picture
Me.ImageS.Picture = Me.ImageS1.Picture
Me.ImageC.Picture = Me.ImageC1.Picture
Me.ImageK.Picture = Me.ImageK1.Picture
Me.ImageI.Picture = Me.ImageI1.Picture
Me.ImageO.Picture = Me.ImageO1.Picture
Me.ImageL.Picture = Me.ImageL2.Picture
Me.ImageR.Picture = Me.ImageR1.Picture
Me.ImagePIC.Picture = Me.ImagePIC1.Picture
Me.ImageLine.Picture = Me.ImageLine1.Picture
End Sub
Private Sub ImageLine_Click()
'实现画框
Dim i, k As Long
Dim x1, x2, y1, y2 As Long
Dim se As Long
Dim temp As Long
If Me.Shape1.Visible = True Then
'Me.Shape1.Visible = False
x1 = Me.Shape1.Left
y1 = Me.Shape1.Top
x2 = x1 + Me.Shape1.Width - 1
y2 = y1 + Me.Shape1.Height - 1
If x2 = x1 Then x2 = x1 + 1
If y2 = y1 Then y2 = y1 + 1
x1 = x1 * 1# * Me.Picture2.Width / Me.Picture1.Width
x2 = x2 * 1# * Me.Picture2.Width / Me.Picture1.Width
y1 = y1 * 1# * Me.Picture2.Height / Me.Picture1.Height
y1 = y1 * 1# * Me.Picture2.Height / Me.Picture1.Height
For i = x1 To x2
k = Abs(i - (x1 + x2) / 2)
se = 255 - k * 255# / (x2 - x1) * 2
se = se * 256 * 256 + se * 256 + se
temp = SetPixelV(Me.Picture2.hdc, i, y1, se)
temp = SetPixelV(Me.Picture2.hdc, i, y2, se)
Next i
For i = y1 To y2
k = Abs(i - (y1 + y2) / 2)
se = 255 - k * 255# / (y2 - y1) * 2
se = se * 256 * 256 + se * 256 + se
temp = SetPixelV(Me.Picture2.hdc, x1, i, se)
temp = SetPixelV(Me.Picture2.hdc, x2, i, se)
Next i
'--------------------------------------------------
x1 = Me.Shape1.Left
y1 = Me.Shape1.Top
x2 = x1 + Me.Shape1.Width - 1
y2 = y1 + Me.Shape1.Height - 1
If x2 = x1 Then x2 = x1 + 1
If y2 = y1 Then y2 = y1 + 1
For i = x1 To x2
k = Abs(i - (x1 + x2) / 2)
se = 255 - k * 255# / (x2 - x1) * 2
se = se * 256 * 256 + se * 256 + se
temp = SetPixelV(Me.Picture1.hdc, i, y1, se)
temp = SetPixelV(Me.Picture1.hdc, i, y2, se)
Next i
For i = y1 To y2
k = Abs(i - (y1 + y2) / 2)
se = 255 - k * 255# / (y2 - y1) * 2
se = se * 256 * 256 + se * 256 + se
temp = SetPixelV(Me.Picture1.hdc, x1, i, se)
temp = SetPixelV(Me.Picture1.hdc, x2, i, se)
Next i
Me.Picture1.Refresh
End If
End Sub
Private Sub ImageLine_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageLine.Picture = Me.ImageLine3.Picture
End Sub
Private Sub ImageLine_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageP.Picture = Me.ImageP1.Picture
Me.ImageS.Picture = Me.ImageS1.Picture
Me.ImageC.Picture = Me.ImageC1.Picture
Me.ImageK.Picture = Me.ImageK1.Picture
Me.ImageI.Picture = Me.ImageI1.Picture
Me.ImageO.Picture = Me.ImageO1.Picture
Me.ImageL.Picture = Me.ImageL1.Picture
Me.ImageR.Picture = Me.ImageR1.Picture
Me.ImagePIC.Picture = Me.ImagePIC1.Picture
Me.ImageLine.Picture = Me.ImageLine2.Picture
End Sub
Private Sub ImageLine_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageLine.Picture = Me.ImageLine2.Picture
End Sub
Private Sub ImageO_Click()
'按选中区域比例缩小图像
Dim x1, y1, x2, y2 As Double
Dim x11, y11, x12, y12 As Double
If Me.Shape1.Visible = True Then
Call SeDataIN
PSeData = 0
'Shape1.Visible = False
x1 = SeData(1, 1) + (SeData(1, 3) - SeData(1, 1)) * Me.Shape1.Left * 15 / Me.Picture1.Width
y1 = SeData(1, 2) + (SeData(1, 4) - SeData(1, 2)) * Me.Shape1.Top * 15 / Me.Picture1.Height
x2 = SeData(1, 1) + (SeData(1, 3) - SeData(1, 1)) * (Me.Shape1.Left + Me.Shape1.Width) * 15 / Me.Picture1.Width
y2 = SeData(1, 2) + (SeData(1, 4) - SeData(1, 2)) * (Me.Shape1.Top + Me.Shape1.Height) * 15 / Me.Picture1.Height
If x1 = x2 Then x1 = x2 - 2
If y1 = y2 Then y1 = y2 - 2
x11 = SeData(1, 1) - (SeData(1, 3) - SeData(1, 1)) * (x1 - SeData(1, 1)) / (x2 - x1)
y11 = SeData(1, 2) - (SeData(1, 4) - SeData(1, 2)) * (y1 - SeData(1, 2)) / (y2 - y1)
x12 = SeData(1, 3) + (SeData(1, 3) - SeData(1, 1)) * (SeData(1, 3) - x2) / (x2 - x1)
y12 = SeData(1, 4) + (SeData(1, 4) - SeData(1, 2)) * (SeData(1, 4) - y2) / (y2 - y1)
SeData(0, 1) = x11
SeData(0, 2) = y11
SeData(0, 3) = x12
SeData(0, 4) = y12
SeData(0, 5) = 0 '颜色锁定
Call Command1_Click
End If
End Sub
Private Sub ImageO_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageO.Picture = Me.ImageO3.Picture
End Sub
Private Sub ImageO_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageP.Picture = Me.ImageP1.Picture
Me.ImageS.Picture = Me.ImageS1.Picture
Me.ImageC.Picture = Me.ImageC1.Picture
Me.ImageK.Picture = Me.ImageK1.Picture
Me.ImageI.Picture = Me.ImageI1.Picture
Me.ImageO.Picture = Me.ImageO2.Picture
Me.ImageL.Picture = Me.ImageL1.Picture
Me.ImageR.Picture = Me.ImageR1.Picture
Me.ImagePIC.Picture = Me.ImagePIC1.Picture
Me.ImageLine.Picture = Me.ImageLine1.Picture
End Sub
Private Sub ImageO_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageO.Picture = Me.ImageO2.Picture
End Sub
Public Sub ImageP_Click()
'开始或重新开始绘图
DoEvents
Shape1.Visible = False
Call Me.Command1_Click
End Sub
Public Sub ImageP_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageP.Picture = Me.ImageP3.Picture
End Sub
Public Sub ImageP_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageP.Picture = Me.ImageP2.Picture
Me.ImageS.Picture = Me.ImageS1.Picture
Me.ImageC.Picture = Me.ImageC1.Picture
Me.ImageK.Picture = Me.ImageK1.Picture
Me.ImageI.Picture = Me.ImageI1.Picture
Me.ImageO.Picture = Me.ImageO1.Picture
Me.ImageL.Picture = Me.ImageL1.Picture
Me.ImageR.Picture = Me.ImageR1.Picture
Me.ImagePIC.Picture = Me.ImagePIC1.Picture
Me.ImageLine.Picture = Me.ImageLine1.Picture
End Sub
Public Sub ImageP_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageP.Picture = Me.ImageP2.Picture
End Sub
Private Sub ImagePIC_Click()
'打开调节 RGB 的窗口 ,并作一些数据准备
Dim i As Long, k As Long, temp As Long
DoEvents
'32位颜色
PicBit = 32
'按PicBit设定的颜色位数计算保存图像数据的长度(字节)
PicLeng = frmMain.Picture2.ScaleWidth * frmMain.Picture2.ScaleHeight * PicBit / 8
i = PicLeng '重新设定数组大小
ReDim PicDataOld(0 To PicLeng - 1) As Byte
ReDim PicDataNew(0 To PicLeng - 1) As Byte
'获取图像数据,并得到实际图像数据的长度(字节)
PicLeng = GetBitmapBits(frmMain.Picture2.Image.Handle, PicLeng, PicDataOld(0))
'PicLeng得到实际图像数据长度
'For i = 0 To 5
' MsgBox PicDataOld(i)
'Next i
'PicBit为实际图像颜色位数
PicBit = Int(1# * PicBit * PicLeng / i + 0.1)
'以下启动调整窗口
If frmMain.OnTop.Checked = True Then
'因为主窗口有可能为顶层窗口,所以先取消主窗口为顶层窗口(其它地方不再赘述)
Call SetWindowPos(Me.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or _
SWP_NOSIZE Or SWP_NOACTIVATE)
End If
frmRGB.Left = Abs(frmMain.Left + (frmMain.Width - frmRGB.Width) / 2)
frmRGB.Top = Abs(frmMain.Top + (frmMain.Height - frmRGB.Height) / 2)
frmRGB.Show 1
If frmMain.OnTop.Checked = True Then
Call SetWindowPos(Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or _
SWP_NOSIZE Or SWP_NOACTIVATE)
End If
End Sub
Private Sub ImagePIC_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImagePIC.Picture = Me.ImagePIC3.Picture
End Sub
Private Sub ImagePIC_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageP.Picture = Me.ImageP1.Picture
Me.ImageS.Picture = Me.ImageS1.Picture
Me.ImageC.Picture = Me.ImageC1.Picture
Me.ImageK.Picture = Me.ImageK1.Picture
Me.ImageI.Picture = Me.ImageI1.Picture
Me.ImageO.Picture = Me.ImageO1.Picture
Me.ImageL.Picture = Me.ImageL1.Picture
Me.ImageR.Picture = Me.ImageR1.Picture
Me.ImagePIC.Picture = Me.ImagePIC2.Picture
Me.ImageLine.Picture = Me.ImageLine1.Picture
End Sub
Private Sub ImagePIC_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImagePIC.Picture = Me.ImagePIC2.Picture
End Sub
Private Sub ImageR_Click()
'载入下一幅图形参数
Dim i As Long
Shape1.Visible = False
If PSeData = 2 Then
Call SeDataOUT
PSeData = 0
Call Command1_Click
ElseIf PSeData <= 19 And PSeData > 2 Then
If SeData(PSeData - 1, 0) = 0 Then Exit Sub
PSeData = PSeData - 1
For i = 0 To 19
SeData(0, i) = SeData(PSeData, i)
Next i
Call Command1_Click
End If
End Sub
Private Sub ImageR_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageR.Picture = Me.ImageR3.Picture
End Sub
Private Sub ImageR_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageP.Picture = Me.ImageP1.Picture
Me.ImageS.Picture = Me.ImageS1.Picture
Me.ImageC.Picture = Me.ImageC1.Picture
Me.ImageK.Picture = Me.ImageK1.Picture
Me.ImageI.Picture = Me.ImageI1.Picture
Me.ImageO.Picture = Me.ImageO1.Picture
Me.ImageL.Picture = Me.ImageL1.Picture
Me.ImageR.Picture = Me.ImageR2.Picture
Me.ImagePIC.Picture = Me.ImagePIC1.Picture
Me.ImageLine.Picture = Me.ImageLine1.Picture
End Sub
Private Sub ImageR_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageR.Picture = Me.ImageR2.Picture
End Sub
Public Sub ImageS_Click()
'停止绘图
Shape1.Visible = False
Call Command2_Click
End Sub
Public Sub ImageS_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageS.Picture = Me.ImageS3.Picture
End Sub
Public Sub ImageS_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageS.Picture = Me.ImageS2.Picture
Me.ImageP.Picture = Me.ImageP1.Picture
Me.ImageC.Picture = Me.ImageC1.Picture
Me.ImageK.Picture = Me.ImageK1.Picture
Me.ImageI.Picture = Me.ImageI1.Picture
Me.ImageO.Picture = Me.ImageO1.Picture
Me.ImageL.Picture = Me.ImageL1.Picture
Me.ImageR.Picture = Me.ImageR1.Picture
Me.ImagePIC.Picture = Me.ImagePIC1.Picture
Me.ImageLine.Picture = Me.ImageLine1.Picture
End Sub
Public Sub ImageS_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageS.Picture = Me.ImageS2.Picture
End Sub
Public Sub ImageC_Click()
Shape1.Visible = False
Call Command4_Click
End Sub
Public Sub ImageC_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Me.ImageC.Picture = Me.ImageC3.Picture
End Sub
Public Sub ImageC_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageC.Picture = Me.ImageC2.Picture
Me.ImageP.Picture = Me.ImageP1.Picture
Me.ImageS.Picture = Me.ImageS1.Picture
Me.ImageK.Picture = Me.ImageK1.Picture
Me.ImageI.Picture = Me.ImageI1.Picture
Me.ImageO.Picture = Me.ImageO1.Picture
Me.ImageL.Picture = Me.ImageL1.Picture
Me.ImageR.Picture = Me.ImageR1.Picture
Me.ImagePIC.Picture = Me.ImagePIC1.Picture
Me.ImageLine.Picture = Me.ImageLine1.Picture
End Sub
Public Sub ImageC_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageC.Picture = Me.ImageC2.Picture
End Sub
Public Sub ImageK_Click()
Shape1.Visible = False
'调用显示“参数控制面板”的过程
Call concleH_Click
End Sub
Public Sub ImageK_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageK.Picture = Me.ImageK3.Picture
End Sub
Public Sub ImageK_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageK.Picture = Me.ImageK2.Picture
Me.ImageP.Picture = Me.ImageP1.Picture
Me.ImageS.Picture = Me.ImageS1.Picture
Me.ImageC.Picture = Me.ImageC1.Picture
Me.ImageI.Picture = Me.ImageI1.Picture
Me.ImageO.Picture = Me.ImageO1.Picture
Me.ImageL.Picture = Me.ImageL1.Picture
Me.ImageR.Picture = Me.ImageR1.Picture
Me.ImagePIC.Picture = Me.ImagePIC1.Picture
Me.ImageLine.Picture = Me.ImageLine1.Picture
End Sub
Public Sub ImageK_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
'快捷图像按钮(工具栏)处理
Me.ImageK.Picture = Me.ImageK2.Picture
End Sub
Private Sub JianbianA1_Click()
'渐变增强
SeDataIN
SeData(0, 9) = SeData(0, 9) + 0.5
End Sub
Private Sub JianbianA2_Click()
'渐变减弱
SeDataIN
SeData(0, 9) = SeData(0, 9) - 0.5
End Sub
'===============
'以下几个过程暂时无用
Private Sub JianbianA3_Click()
SeData(0, 10) = SeData(0, 10) + 0.5
End Sub
Private Sub JianbianA4_Click()
SeData(0, 10) = SeData(0, 10) - 0.5
End Sub
Private Sub JianbianA5_Click()
SeData(0, 11) = SeData(0, 11) + 0.5
End Sub
Private Sub JianbianA6_Click()
SeData(0, 11) = SeData(0, 11) - 0.5
End Sub
Private Sub JianbianA7_Click()
SeData(0, 12) = SeData(0, 12) + 0.5
End Sub
Private Sub JianbianA8_Click()
SeData(0, 12) = SeData(0, 12) - 0.5
End Sub
'=================
Private Sub picM_Click()
'打开图片大小设置窗口
If frmMain.OnTop.Checked = True Then
'因为主窗口有可能为顶层窗口,所以先取消主窗口为顶层窗口(其它地方不再赘述)
Call SetWindowPos(Me.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or _
SWP_NOSIZE Or SWP_NOACTIVATE)
End If
frmPicSize.Left = Abs(frmMain.Left + (frmMain.Width - frmPicSize.Width) / 2)
frmPicSize.Top = Abs(frmMain.Top + (frmMain.Height - frmPicSize.Height) / 2)
frmPicSize.Show 1
If frmMain.OnTop.Checked = True Then
Call SetWindowPos(Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or _
SWP_NOSIZE Or SWP_NOACTIVATE)
End If
End Sub
Private Sub Picture1_MouseDown(Bu As Integer, Shift As Integer, x As Single, y As Single)
If Bu = 2 Then
'PopupMenu bianji, 2 '右健菜单
Exit Sub
ElseIf Bu = 1 Then
'实现画框、放大或缩小时的 框图选择 显示
Shape1.Left = x: Shape1.Top = y
Shape1.Width = 1: Shape1.Height = 1
Shape1.Visible = True
Msx0 = x: Msy0 = y '画框时框的初始坐标
End If
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
'实现画框、放大或缩小时的 框图选择 显示
If Button = 1 Then
If y - Msy0 > 0 Then
Msy1 = Msy0 + Abs(x - Msx0) * picY / (picX + 2)
Else
Msy1 = Msy0 - Abs(x - Msx0) * picY / (picX + 2)
End If
Msx1 = x
Shape1.Left = Min(Msx0, Msx1)
Shape1.Top = Min(Msy0, Msy1)
Shape1.Width = Abs(Msx0 - Msx1) + 1
Shape1.Height = Abs(Msy0 - Msy1) + 1 'Shape1.Width * picy / (picx + 2)
End If
'=====================================
'快捷图像按钮(工具栏)处理
Me.ImageP.Picture = Me.ImageP1.Picture
Me.ImageS.Picture = Me.ImageS1.Picture
Me.ImageC.Picture = Me.ImageC1.Picture
Me.ImageK.Picture = Me.ImageK1.Picture
Me.ImageI.Picture = Me.ImageI1.Picture
Me.ImageO.Picture = Me.ImageO1.Picture
Me.ImageL.Picture = Me.ImageL1.Picture
Me.ImageR.Picture = Me.ImageR1.Picture
Me.ImagePIC.Picture = Me.ImagePIC1.Picture
Me.ImageLine.Picture = Me.ImageLine1.Picture
End Sub
Private Sub Picture1_MouseUp(Bu As Integer, Shift As Integer, x As Single, y As Single)
Dim x1 As Double, y1 As Double, x2 As Double, y2 As Double
'实现画框、放大或缩小时的 框图选择 显示
If Bu = 1 Then
MousePointer = Default
If Me.Shape1.Width < 7 And Me.Shape1.Height < 7 Then Me.Shape1.Visible = False
End If
End Sub
Private Sub Timer1_Timer()
'调试渐变参数用
Text6.Text = SeData(0, 9)
End Sub
Private Sub tuichu_Click()
'退出程序
End
End Sub
Private Sub tuxiang_Click()
'帮助: 关于 牛顿迭代法解方程混沌 的说明
If frmMain.OnTop.Checked = True Then
'因为主窗口有可能为顶层窗口,所以先取消主窗口为顶层窗口(其它地方不再赘述)
Call SetWindowPos(Me.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or _
SWP_NOSIZE Or SWP_NOACTIVATE)
End If
frmAboutF.Left = Abs(frmMain.Left + (frmMain.Width - frmAboutF.Width) / 2)
frmAboutF.Top = Abs(frmMain.Top + (frmMain.Height - frmAboutF.Height) / 2)
frmAboutF.Show 1
If frmMain.OnTop.Checked = True Then
Call SetWindowPos(Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or _
SWP_NOSIZE Or SWP_NOACTIVATE)
End If
End Sub
'=======================================================