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

📄 00000.frm

📁 c语言实现的排序算法
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   5760
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7410
   LinkTopic       =   "Form1"
   ScaleHeight     =   5760
   ScaleWidth      =   7410
   StartUpPosition =   3  'Windows Default
   Begin VB.ComboBox Combo2 
      Height          =   300
      Left            =   2280
      Style           =   2  'Dropdown List
      TabIndex        =   11
      Top             =   4440
      Width           =   2295
   End
   Begin VB.ComboBox Combo1 
      Height          =   315
      Left            =   2280
      Style           =   2  'Dropdown List
      TabIndex        =   10
      Top             =   3840
      Width           =   2295
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   3600
      TabIndex        =   5
      Text            =   "100"
      Top             =   480
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "排序"
      Height          =   495
      Left            =   2280
      TabIndex        =   3
      Top             =   5040
      Width           =   2295
   End
   Begin VB.CommandButton Command1 
      Caption         =   "产生数据"
      Height          =   495
      Left            =   2400
      TabIndex        =   2
      Top             =   1080
      Width           =   2415
   End
   Begin VB.ListBox List2 
      Height          =   4740
      Left            =   5400
      TabIndex        =   1
      Top             =   360
      Width           =   1575
   End
   Begin VB.ListBox List1 
      Height          =   4740
      Left            =   120
      TabIndex        =   0
      Top             =   600
      Width           =   1455
   End
   Begin VB.Label Label7 
      Caption         =   "排序后"
      Height          =   255
      Left            =   5520
      TabIndex        =   13
      Top             =   120
      Width           =   1095
   End
   Begin VB.Label Label6 
      Caption         =   "排序前"
      Height          =   255
      Left            =   480
      TabIndex        =   12
      Top             =   120
      Width           =   855
   End
   Begin VB.Label Label5 
      Caption         =   "循环次数:"
      Height          =   495
      Left            =   2400
      TabIndex        =   9
      Top             =   3000
      Width           =   2295
   End
   Begin VB.Label Label4 
      Caption         =   "耗时:"
      Height          =   495
      Left            =   2400
      TabIndex        =   8
      Top             =   2400
      Width           =   2295
   End
   Begin VB.Label Label3 
      Caption         =   "结束时间:"
      Height          =   255
      Left            =   2400
      TabIndex        =   7
      Top             =   2040
      Width           =   2415
   End
   Begin VB.Label Label2 
      Caption         =   "起始时间:"
      Height          =   255
      Left            =   2400
      TabIndex        =   6
      Top             =   1680
      Width           =   2415
   End
   Begin VB.Label Label1 
      Caption         =   "数组大小:"
      Height          =   495
      Left            =   2400
      TabIndex        =   4
      Top             =   480
      Width           =   1215
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

 '组合框combo1的单击事件,选择升降序
Private Sub Combo1_Change()
  
End Sub
'字号组合框combo2的单击事件,选择排序方法
Private Sub Combo2_Change()

End Sub
'产生随机数
Private Sub Command1_Click()
  Dim n As Integer
    n = Text1.Text
 Dim number(1 To 10000) As Integer
 Dim m As Integer
 Randomize
  For m = 1 To n
  number(m) = Int(Rnd * n) + 1
 List1.AddItem number(m)
 Next m
 End Sub

Private Sub Command2_Click()
Static index As Integer
index = index + 1
Select Case index
    case1
      Combo2.Text = "冒泡排序"
    case2
      Combo2.Text = "选择排序"
      index = 0
  End Select
End Sub

'在load事件中,将各列表项加入到组合框combo1、组合框combo2中
Private Sub Form_Load()
Combo1.AddItem "升序"
Combo1.AddItem "降序"
Combo2.AddItem "冒泡排序"
Combo2.AddItem "插入排序"
Combo2.AddItem "桶排序"
Combo2.AddItem "选择排序"
Combo2.AddItem "希尔排序"
Combo2.AddItem "快速排序"
Combo2.AddItem "堆排序"
End Sub

⌨️ 快捷键说明

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