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

📄 frmselecttype.frm

📁 用vb写的饮食管理系统功能全面
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmSelectType 
   BackColor       =   &H00C0E0FF&
   BorderStyle     =   0  'None
   Caption         =   "选择单位"
   ClientHeight    =   3150
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   1935
   Icon            =   "frmSelectType.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3150
   ScaleWidth      =   1935
   ShowInTaskbar   =   0   'False
   Begin MSFlexGridLib.MSFlexGrid Grid1 
      Height          =   3225
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   1935
      _ExtentX        =   3413
      _ExtentY        =   5689
      _Version        =   393216
      Rows            =   15
      Cols            =   1
      FixedCols       =   0
      BackColorBkg    =   12640511
      FocusRect       =   0
      Appearance      =   0
   End
End
Attribute VB_Name = "frmSelectType"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_KeyPress(KeyAscii As Integer)

 If KeyAscii = 13 Then
    '关闭
    Grid1_Click
    Unload Me
 End If
 If KeyAscii = 27 Then
    Unload Me
 End If
 
End Sub

Private Sub Form_Load()
 
  '安装数据
   ListGrid
    
End Sub

Private Sub Grid1_Click()

 ' 新建类别
   If Grid1.Text = "新建..." Then
      CunstomType1.Show 1
      '刷新数据
      ListGrid
      Exit Sub
   End If

  stype = Grid1.Text
  Unload Me
  
End Sub

Private Sub ListGrid()

   '配置网格
Grid1.Visible = False
Grid1.Cols = 1
Grid1.Clear
Grid1.FormatString = "^ 分 类 名 称 "
Grid1.ColWidth(0) = 2030

Dim DB As Database, EF As Recordset, HH As Integer
      
  
  Set DB = OpenDatabase(ConData, False, False, Constr)

    Set EF = DB.OpenRecordset("MenuType", dbOpenTable)
        Grid1.Rows = EF.RecordCount + 2
        
        If Grid1.Rows < 14 Then
           Grid1.Rows = 14
        End If
        
    Set EF = DB.OpenRecordset("Select * From MenuType", dbOpenDynaset)
        HH = 1
        Grid1.Col = 0
        Grid1.CellAlignment = 4  '居中
        Grid1.Text = "新建..."
        HH = 2
        Do While Not EF.EOF()
           Grid1.Row = HH
           Grid1.Col = 0
           Grid1.CellAlignment = 1
        If Not IsNull(EF.Fields(1).Value) Then
           Grid1.Text = EF.Fields(1).Value
        End If
          EF.MoveNext
          HH = HH + 1
        Loop
        DB.Close
 Grid1.Col = 0
 Grid1.Row = 1
 Grid1.ColSel = 0
 Grid1.Visible = True

End Sub

⌨️ 快捷键说明

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