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

📄 frmselect.frm

📁 仓库管理软件,库存信息,仓库入库,仓库出库,单据新增,修改,删除,审核,反审核等等功能.
💻 FRM
字号:
VERSION 5.00
Object = "{E684D8A3-716C-4E59-AA94-7144C04B0074}#1.1#0"; "GRIDEX20.OCX"
Begin VB.Form frmSelect 
   Caption         =   "物品选择框"
   ClientHeight    =   8025
   ClientLeft      =   4290
   ClientTop       =   4770
   ClientWidth     =   10110
   LinkTopic       =   "Form1"
   ScaleHeight     =   8025
   ScaleWidth      =   10110
   Begin GridEX20.GridEX Grid 
      Height          =   5640
      Left            =   1125
      TabIndex        =   0
      Top             =   1125
      Width           =   7665
      _ExtentX        =   13520
      _ExtentY        =   9948
      Version         =   "2.0"
      AllowRowSizing  =   -1  'True
      BoundColumnIndex=   ""
      ReplaceColumnIndex=   ""
      ColumnAutoResize=   -1  'True
      GroupByBoxVisible=   0   'False
      ColumnHeaderHeight=   270
      IntProp1        =   0
      IntProp2        =   0
      IntProp7        =   0
      ColumnsCount    =   2
      Column(1)       =   "frmSelect.frx":0000
      Column(2)       =   "frmSelect.frx":00C8
      FormatStylesCount=   5
      FormatStyle(1)  =   "frmSelect.frx":016C
      FormatStyle(2)  =   "frmSelect.frx":02B0
      FormatStyle(3)  =   "frmSelect.frx":0360
      FormatStyle(4)  =   "frmSelect.frx":0414
      FormatStyle(5)  =   "frmSelect.frx":04EC
      ImageCount      =   0
      PrinterProperties=   "frmSelect.frx":05A4
   End
End
Attribute VB_Name = "frmSelect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rstGrid As New ADODB.Recordset
Public iForm As Form

Private Sub Form_Load()
    Me.Icon = frmMain.Icon
    
    If rstGrid.State = 1 Then rstGrid.Close
    Set rstGrid = Nothing
    rstGrid.CursorLocation = adUseClient
    rstGrid.Open "select * from StockInfo", con, adOpenStatic, adLockBatchOptimistic
    
    Set Grid.ADORecordset = rstGrid
    
    Grid.Columns(1).Visible = False
    Grid.Columns(2).Caption = "物品编码"
    Grid.Columns(3).Caption = "物品名称"
    Grid.Columns(4).Caption = "单价"
    Grid.Columns(5).Caption = "库存"
    Grid.Columns(6).Caption = "金额"
    Grid.Columns(7).Caption = "备注"
    
    Grid.AllowAddNew = False
    Grid.AllowEdit = False
    Grid.AllowDelete = False
    Grid.SelectionStyle = jgexEntireRow
    Grid.ColumnAutoResize = True
    ColumnCenter Grid
End Sub

Private Sub Form_Resize()
On Error Resume Next
    Grid.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
End Sub

Private Sub Form_Unload(Cancel As Integer)
    If rstGrid.State = 1 Then rstGrid.Close
    Set rstGrid = Nothing
End Sub

Private Sub Grid_DblClick()
    With iForm
        .Grid.Value(3) = Me.Grid.Value(2)
        .Grid.Value(4) = Me.Grid.Value(3)
        
        .Grid.Value(5) = Me.Grid.Value(4)
        .Grid.Value(6) = 0
        .Grid.Value(7) = .Grid.Value(5) * .Grid.Value(6)
        .Grid.Row = .Grid.Row + 1
    End With
    
    Unload Me
End Sub

⌨️ 快捷键说明

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