📄 一维扩散方程.frm
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form formY
Caption = "一维扩散方程"
ClientHeight = 9495
ClientLeft = 60
ClientTop = 450
ClientWidth = 11430
DrawWidth = 2
LinkTopic = "Form1"
ScaleHeight = 9495
ScaleWidth = 11430
StartUpPosition = 3 '窗口缺省
WindowState = 2 'Maximized
Begin RichTextLib.RichTextBox RichTextBox2
Height = 2895
Left = 240
TabIndex = 20
Top = 5640
Width = 2535
_ExtentX = 4471
_ExtentY = 5106
_Version = 393217
ScrollBars = 3
TextRTF = $"一维扩散方程.frx":0000
End
Begin VB.ComboBox Combob
Height = 300
ItemData = "一维扩散方程.frx":009D
Left = 3840
List = "一维扩散方程.frx":00B6
TabIndex = 19
Text = "0.001"
Top = 1560
Width = 975
End
Begin VB.CommandButton Command3
Caption = "精确解"
Height = 495
Left = 6600
TabIndex = 18
Top = 240
Width = 855
End
Begin RichTextLib.RichTextBox RichTextBox1
Height = 3135
Left = 240
TabIndex = 15
Top = 2040
Width = 2535
_ExtentX = 4471
_ExtentY = 5530
_Version = 393217
BackColor = -2147483633
Enabled = -1 'True
ScrollBars = 3
DisableNoScroll = -1 'True
AutoVerbMenu = -1 'True
TextRTF = $"一维扩散方程.frx":00EA
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
End
Begin VB.CommandButton Command2
Caption = "清屏"
Height = 495
Left = 7920
TabIndex = 14
Top = 240
Width = 975
End
Begin VB.ComboBox Combodx
Height = 300
ItemData = "一维扩散方程.frx":0189
Left = 3840
List = "一维扩散方程.frx":019F
TabIndex = 13
Top = 360
Width = 975
End
Begin VB.ComboBox Combodt
Height = 300
ItemData = "一维扩散方程.frx":01C4
Left = 3840
List = "一维扩散方程.frx":01D7
TabIndex = 12
Top = 720
Width = 975
End
Begin VB.ComboBox Combot
Height = 300
ItemData = "一维扩散方程.frx":01FC
Left = 3840
List = "一维扩散方程.frx":0218
TabIndex = 11
Top = 1080
Width = 975
End
Begin VB.TextBox Text1
Height = 495
Left = 7080
TabIndex = 9
Top = 1080
Width = 4215
End
Begin VB.CommandButton Command1
Caption = "退出"
Height = 495
Left = 9240
TabIndex = 8
Top = 240
Width = 975
End
Begin VB.Frame Frame1
Caption = "格式选择"
Height = 1332
Left = 120
TabIndex = 4
Top = 240
Width = 2175
Begin VB.OptionButton OptionCN
Caption = "Crank-Nicalson格式"
Height = 375
Left = 240
TabIndex = 7
Top = 840
Width = 1815
End
Begin VB.OptionButton OptionYF
Caption = "FTCS隐格式"
Height = 375
Left = 240
TabIndex = 6
Top = 480
Width = 1335
End
Begin VB.OptionButton OptionXF
Caption = "FTCS显格式"
Height = 255
Left = 240
TabIndex = 5
Top = 240
Width = 1455
End
End
Begin VB.CommandButton Command
Caption = "数值解"
Height = 495
Left = 5280
TabIndex = 0
Top = 240
Width = 975
End
Begin VB.Label Label7
Caption = "精确解显示:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 21
Top = 5280
Width = 1455
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "热扩散系数"
Height = 180
Left = 2760
TabIndex = 17
Top = 1680
Width = 900
End
Begin VB.Label Label3
Caption = "数值解显示:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 16
Top = 1680
Width = 2775
End
Begin VB.Label Label4
Alignment = 2 'Center
Caption = "结果已保存至"
Height = 255
Left = 5760
TabIndex = 10
Top = 1200
Width = 1095
End
Begin VB.Label Label6
Alignment = 2 'Center
Caption = "dt"
Height = 180
Left = 3240
TabIndex = 3
Top = 840
Width = 375
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "T"
Height = 255
Left = 3240
TabIndex = 2
Top = 1200
Width = 375
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "dx"
Height = 255
Left = 3240
TabIndex = 1
Top = 480
Width = 375
End
End
Attribute VB_Name = "formY"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Sub MathPlot(point() As Single, nx As Integer, dx As Single, judge As Integer)
Dim i As Integer, j As Integer, k As Integer
'formY.Cls
formY.Scale (-1, 300)-(2, -100) '定义坐标系
DrawWidth = 2 '坐标轴线宽度
Line (-0.5, 0)-(1.5, 0) '画X轴
Line (0, -50)-(0, 200) '画Y轴
CurrentX = 2: CurrentY = 0.5: Print "X"
CurrentX = 0: CurrentY = 200: Print "T"
For i = 0 To 1 '在X轴上标记坐标刻度
Line (i, 0)-(i, 10)
CurrentX = i: CurrentY = 0: Print i
Next i
'在Y轴上标记刻度
Line (0, 100)-(0.01, 100)
CurrentX = 0.01: CurrentY = 100: Print 100
Line (0, 50)-(0.01, 50)
CurrentX = 0.01: CurrentY = 50: Print 50
Line (0, -50)-(0.01, -50)
CurrentX = 0.01: CurrentY = -50: Print -50
If judge = 0 Then
DrawWidth = 2 '线宽度
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -