📄 selectmethod.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form SelectMethod
AutoRedraw = -1 'True
BorderStyle = 3 'Fixed Dialog
Caption = "选择下列产品类型"
ClientHeight = 4440
ClientLeft = 45
ClientTop = 330
ClientWidth = 8460
Icon = "SelectMethod.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 4440
ScaleWidth = 8460
ShowInTaskbar = 0 'False
Begin MSFlexGridLib.MSFlexGrid Grid2
Height = 4170
Left = 150
TabIndex = 0
Top = 135
Width = 8145
_ExtentX = 14367
_ExtentY = 7355
_Version = 393216
Rows = 10
Cols = 10
BackColorFixed = 12640511
ForeColorFixed = 4194304
BackColorSel = 12648384
ForeColorSel = 192
BackColorBkg = 12632256
GridColor = 12632064
AllowBigSelection= 0 'False
FocusRect = 0
ScrollBars = 2
SelectionMode = 1
End
End
Attribute VB_Name = "SelectMethod"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
SelectMethod.Left = (MDIForm1.Width - SelectMethod.Width) / 2
SelectMethod.Top = (MDIForm1.Height - SelectMethod.Height) / 2 - 1000
Dim DB As Database, Ef As Recordset, HH As Integer
'配置网格
Grid2.Visible = False
Grid2.Cols = 2
Grid2.FormatString = "^ 序号 |^ 产 品 类 型 名 "
Grid2.ColWidth(0) = 830
Grid2.ColWidth(1) = 7230
Set DB = OpenDatabase(App.Path & "\Sys\Store.mdb", 0, 0, Constr)
Set Ef = DB.OpenRecordset("CPLX", dbOpenTable)
Grid2.Rows = Ef.RecordCount + 15
Set Ef = DB.OpenRecordset("Select * From CPLX", dbOpenDynaset)
HH = 1
Do While Not Ef.EOF()
Grid2.Row = HH
Grid2.Col = 1
Grid2.CellAlignment = 1
If Not IsNull(Ef.Fields(0).Value) Then
Grid2.Text = Ef.Fields(0).Value
End If
Ef.MoveNext
HH = HH + 1
Loop
DB.Close
For HH = 1 To Grid2.Rows - 1
Grid2.Row = HH
Grid2.Col = 0
Grid2.Text = HH
If Len(Grid2.Text) = 1 Then
Grid2.Text = "0" + Grid2.Text
End If
Next
Grid2.Col = 1
Grid2.Row = 1
Grid2.ColSel = 1
Grid2.Visible = True
End Sub
Private Sub Grid2_DblClick()
If Grid2.MouseCol = 0 Or Grid2.MouseRow = 0 Or Grid2.Text = "" Then Exit Sub
CpTypeName = Grid2.Text
SelectMethod.MousePointer = 11
If CKCancel = False Then
Unload Me
If SProduct.Visible = True Then
SProduct.SetFocus
Else
SProduct.Show
End If
Exit Sub
Else
Unload Me
If OutStore.Visible = True Then
OutStore.SetFocus
Else
OutStore.Show
End If
Exit Sub
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -