⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 optimumpath3.frm

📁 本程序是一个用prim算法寻找最小生成树的小程序。
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form2 
   BorderStyle     =   5  'Sizable ToolWindow
   Caption         =   "Form2"
   ClientHeight    =   1020
   ClientLeft      =   4500
   ClientTop       =   3765
   ClientWidth     =   3345
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1020
   ScaleWidth      =   3345
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command3 
      Caption         =   "Command3"
      Height          =   375
      Left            =   2160
      TabIndex        =   6
      Top             =   600
      Width           =   975
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Command2"
      Height          =   375
      Left            =   1080
      TabIndex        =   5
      Top             =   600
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   375
      Left            =   0
      TabIndex        =   4
      Top             =   600
      Width           =   975
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1920
      TabIndex        =   3
      Text            =   "Text2"
      Top             =   120
      Width           =   735
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   600
      TabIndex        =   1
      Text            =   "Text1"
      Top             =   120
      Width           =   735
   End
   Begin VB.Label Label2 
      Caption         =   "Label2"
      Height          =   375
      Left            =   1320
      TabIndex        =   2
      Top             =   120
      Width           =   615
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   375
      Left            =   0
      TabIndex        =   0
      Top             =   120
      Width           =   615
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error GoTo epr
cn.Execute "insert into vertex values('" & Trim(Text1.Text) & "','" & Trim(Text2.Text) & "')"
Call Form1.pref
Exit Sub
epr:
MsgBox Err.Description, vbOKOnly, "error"
End Sub

Private Sub Command3_Click()
Unload Form2
End Sub
Private Sub Form_Load()
Label1.Caption = "x坐标:"
Label2.Caption = "y坐标:"

Text1.Text = ""
Text2.Text = ""

Command1.Caption = "确定"
Command2.Caption = "清空"
Command3.Caption = "退出"
End Sub

Private Sub Text1_Change()
Dim st As String
If IsNumeric(Text1.Text) = False And Len(Text1.Text) > 0 Then
MsgBox "只能输入数字", vbOKOnly, "提示"
st = Trim(Text1.Text)
st = Left(st, Len(st) - 1)
Text1.Text = st
End If
End Sub

Private Sub Text2_Change()
Dim st As String
If IsNumeric(Text2.Text) = False And Len(Text2.Text) > 0 Then
MsgBox "只能输入数字", vbOKOnly, "提示"
st = Trim(Text2.Text)
st = Left(st, Len(st) - 1)
Text2.Text = st
End If
End Sub

Private Sub Text3_Change()
Dim st As String
If IsNumeric(Text3.Text) = False And Len(Text3.Text) > 0 Then
MsgBox "只能输入数字", vbOKOnly, "提示"
st = Trim(Text3.Text)
st = Left(st, Len(st) - 1)
Text3.Text = st
End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -