📄 输入图形界面.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form tuxing1
AutoRedraw = -1 'True
Caption = "图形界面"
ClientHeight = 7200
ClientLeft = 2550
ClientTop = 1290
ClientWidth = 8625
FillColor = &H80000004&
Icon = "输入图形界面.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form2"
MDIChild = -1 'True
ScaleHeight = 7200
ScaleWidth = 8625
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 255
Left = 0
TabIndex = 5
Top = 6945
Width = 8625
_ExtentX = 15214
_ExtentY = 450
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 2
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 2
Enabled = 0 'False
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 2
Enabled = 0 'False
EndProperty
EndProperty
End
Begin VB.TextBox xval1
Alignment = 1 'Right Justify
Appearance = 0 'Flat
BackColor = &H80000004&
BorderStyle = 0 'None
ForeColor = &H80000009&
Height = 300
Left = 600
Locked = -1 'True
TabIndex = 4
Text = "Text2"
Top = 6900
Width = 600
End
Begin VB.TextBox yval1
Alignment = 1 'Right Justify
Appearance = 0 'Flat
BackColor = &H80000004&
BorderStyle = 0 'None
ForeColor = &H80000009&
Height = 270
Left = 0
Locked = -1 'True
TabIndex = 3
Text = "Text1"
Top = 6630
Width = 600
End
Begin VB.TextBox xval
Alignment = 1 'Right Justify
Appearance = 0 'Flat
BackColor = &H80000004&
BorderStyle = 0 'None
ForeColor = &H80000009&
Height = 300
Left = 8040
TabIndex = 2
Text = "Text2"
Top = 6900
Width = 600
End
Begin VB.TextBox yval
Alignment = 1 'Right Justify
Appearance = 0 'Flat
BackColor = &H80000004&
BorderStyle = 0 'None
ForeColor = &H80000009&
Height = 270
Left = 0
TabIndex = 1
Text = "Text1"
Top = 240
Width = 600
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
ForeColor = &H80000008&
Height = 6400
Left = 600
MouseIcon = "输入图形界面.frx":030A
ScaleHeight = 6375
ScaleWidth = 7965
TabIndex = 0
Top = 400
Width = 8000
Begin VB.TextBox Text1
Appearance = 0 'Flat
BorderStyle = 0 'None
Height = 255
Left = 0
LinkTimeout = 0
MousePointer = 3 'I-Beam
TabIndex = 7
Text = "Text1"
Top = 0
Visible = 0 'False
Width = 615
End
Begin VB.Line Line1
Index = 0
Visible = 0 'False
X1 = 0
X2 = 0
Y1 = 120
Y2 = 0
End
End
Begin RichTextLib.RichTextBox command
Height = 500
Left = 1920
TabIndex = 6
Top = 0
Width = 4995
_ExtentX = 8811
_ExtentY = 873
_Version = 393217
ScrollBars = 2
TextRTF = $"输入图形界面.frx":0FD4
End
End
Attribute VB_Name = "tuxing1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private iii As Integer
Public aa, bb, cc, Ff As Single
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = Asc("s") Then Text1.SetFocus
End Sub
Public Sub Form_Load()
' Me.Height = 6000
' Me.Width = 8000
Me.Left = gongju1.Width + 10
Me.Top = 0
Call Form_Resize
End Sub
Sub 坐标系(aa, bb, cc)
tuxing1.Cls
Dim D, e
D = 1: e = 1
N = Int(Val(cc) / 1000)
M = Int(Val(bb) / 1000)
If N > 25 Then D = Int(N / 25 + 1)
If M > 10 Then e = Int(M / 10 + 1)
xval1.Text = Int(-1000 * aa)
yval1.Text = Int(-1000 * aa)
If Gridx = 0 Then Gridx = 300
If Gridy = 0 Then Gridy = 300
If Gridxxxx = 0 Then Gridxxxx = 300
If Gridyyyy = 0 Then Gridyyyy = 300
Picture1.Scale (Val(xval1.Text) / Gridx, cc / Gridy)-(bb / Gridx, Val(yval1.Text) / Gridy)
For i = -D To N
Me.Line (Picture1.Left - 100, Picture1.Height + Picture1.Top - 1000 - i * 1000 / aa)-(Picture1.Left, Picture1.Height + Picture1.Top - 1000 - i * 1000 / aa), vbWhite
Next i
For j = -e To M
Me.Line (Picture1.Left + 1000 + j * 1000 / aa, Picture1.Height + Picture1.Top + 100)-(Picture1.Left + 1000 + j * 1000 / aa, Picture1.Height + Picture1.Top), vbWhite
Next j
For i = -D To N Step D
CurrentX = Picture1.Left - 650
CurrentY = Picture1.Height + Picture1.Top - 1000 - i * 1000 / aa - 75
Print i * 1000
Next i
For j = -e To M Step e
CurrentX = Picture1.Left + 1000 + j * 1000 / aa - 200
CurrentY = Picture1.Height + Picture1.Top + 120
Print j * 1000
Next j
Call 杆件图1(Picture1)
End Sub
Private Sub Form_Resize()
Dim Fscal
Dim F
If Me.Height < 1000 + command.Height + 1050 Then Me.Height = 1000 + command.Height + 1050
Fscal = Picture1.Height
Picture1.Height = Me.Height - command.Height - 150 - 900
F = Picture1.Height / Fscal
Picture1.Width = Me.Width - 800
Picture1.Top = 50
Picture1.Left = 600
xval.Top = Picture1.Height + Picture1.Top
xval.Left = Picture1.Left + Picture1.Width - xval.Width
xval1.Top = Picture1.Height + Picture1.Top
xval1.Left = Picture1.Left
yval.Top = Picture1.Top
yval.Left = Picture1.Left - yval.Width
yval1.Top = Picture1.Height + Picture1.Top - yval.Height
yval1.Left = Picture1.Left - yval1.Width
command.Top = Me.Height - command.Height - 50 - 620
command.Left = 600
If Val(Ceng) = 0 Or Val(Kua) = 0 Then
yval.Text = 12000
xval.Text = Int((Picture1.Width - 1000) / (Picture1.Height - 1000) * Val(yval.Text))
cc = Val(yval.Text)
bb = Val(xval.Text)
aa = bb / (Picture1.Width - 1000)
ElseIf Val(Ceng) > 0 And Val(Kua) > 0 Then
If Cengtot / Picture1.Height > Kuatot / Picture1.Width Then
yval.Text = Int(Cengtot * 1.1 * 1000 * F)
cc = Int(Cengtot * 1.1 * 1000 * F)
aa = cc / (Picture1.Height - 1000)
xval.Text = Int((Picture1.Width - 1000) * aa)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -