?? frmselecttype.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 + -