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

📄 frmpdelete.frm

📁 通用样品管理系统是一个商业程序,功能界面都还不错!
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmPDelete 
   AutoRedraw      =   -1  'True
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "正在进行删除操作..."
   ClientHeight    =   5310
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7050
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   5310
   ScaleWidth      =   7050
   ShowInTaskbar   =   0   'False
   Begin VB.PictureBox Picture2 
      AutoRedraw      =   -1  'True
      Height          =   435
      Left            =   4335
      ScaleHeight     =   375
      ScaleWidth      =   2265
      TabIndex        =   19
      Top             =   315
      Width           =   2325
      Begin VB.CommandButton E_Button 
         Cancel          =   -1  'True
         Caption         =   "退出(&X)"
         Height          =   375
         Left            =   1125
         TabIndex        =   21
         Top             =   0
         Width           =   1140
      End
      Begin VB.CommandButton S_Button 
         Caption         =   "删除(&D)"
         Height          =   375
         Left            =   0
         TabIndex        =   20
         Top             =   0
         Width           =   1125
      End
   End
   Begin VB.TextBox FieldsTxt 
      Height          =   285
      Index           =   9
      Left            =   4515
      Locked          =   -1  'True
      MaxLength       =   125
      TabIndex        =   18
      Top             =   1875
      Width           =   2145
   End
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      BackColor       =   &H80000000&
      FillColor       =   &H000000FF&
      ForeColor       =   &H000000FF&
      Height          =   1245
      Left            =   345
      ScaleHeight     =   1215
      ScaleWidth      =   3165
      TabIndex        =   11
      Top             =   3705
      Width           =   3195
      Begin VB.TextBox FieldsTxt 
         Height          =   285
         Index           =   8
         Left            =   975
         Locked          =   -1  'True
         MaxLength       =   10
         TabIndex        =   14
         Top             =   780
         Width           =   1935
      End
      Begin VB.TextBox FieldsTxt 
         Height          =   285
         Index           =   7
         Left            =   975
         Locked          =   -1  'True
         MaxLength       =   10
         TabIndex        =   13
         Top             =   450
         Width           =   1935
      End
      Begin VB.TextBox FieldsTxt 
         Height          =   285
         Index           =   6
         Left            =   975
         Locked          =   -1  'True
         MaxLength       =   10
         TabIndex        =   12
         Top             =   120
         Width           =   1935
      End
      Begin VB.Label Label1 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "其它价:"
         Height          =   180
         Index           =   8
         Left            =   -30
         TabIndex        =   17
         Top             =   855
         Width           =   960
      End
      Begin VB.Label Label1 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "零售价:"
         Height          =   180
         Index           =   7
         Left            =   -30
         TabIndex        =   16
         Top             =   525
         Width           =   960
      End
      Begin VB.Label Label1 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "批发价:"
         Height          =   180
         Index           =   6
         Left            =   -30
         TabIndex        =   15
         Top             =   180
         Width           =   960
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "特色系列"
      Height          =   1770
      Left            =   330
      TabIndex        =   2
      Top             =   1770
      Width           =   3195
      Begin VB.TextBox FieldsTxt 
         Height          =   285
         Index           =   5
         Left            =   975
         Locked          =   -1  'True
         MaxLength       =   25
         TabIndex        =   6
         Top             =   1290
         Width           =   1995
      End
      Begin VB.TextBox FieldsTxt 
         Height          =   285
         Index           =   4
         Left            =   975
         Locked          =   -1  'True
         MaxLength       =   25
         TabIndex        =   5
         Top             =   975
         Width           =   1995
      End
      Begin VB.TextBox FieldsTxt 
         Height          =   285
         Index           =   3
         Left            =   975
         Locked          =   -1  'True
         MaxLength       =   25
         TabIndex        =   4
         Top             =   645
         Width           =   1995
      End
      Begin VB.TextBox FieldsTxt 
         Height          =   285
         Index           =   2
         Left            =   975
         Locked          =   -1  'True
         MaxLength       =   25
         TabIndex        =   3
         Top             =   330
         Width           =   1995
      End
      Begin VB.Label Label1 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         Caption         =   "其它:"
         Height          =   180
         Index           =   5
         Left            =   30
         TabIndex        =   10
         Top             =   1350
         Width           =   885
      End
      Begin VB.Label Label1 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         Caption         =   "风格:"
         Height          =   180
         Index           =   4
         Left            =   30
         TabIndex        =   9
         Top             =   1020
         Width           =   885
      End
      Begin VB.Label Label1 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         Caption         =   "尺码:"
         Height          =   180
         Index           =   3
         Left            =   30
         TabIndex        =   8
         Top             =   705
         Width           =   885
      End
      Begin VB.Label Label1 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         Caption         =   "颜色:"
         Height          =   180
         Index           =   2
         Left            =   30
         TabIndex        =   7
         Top             =   375
         Width           =   885
      End
   End
   Begin VB.TextBox FieldsTxt 
      Height          =   600
      Index           =   1
      Left            =   1290
      Locked          =   -1  'True
      MaxLength       =   125
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   1
      Top             =   1050
      Width           =   5385
   End
   Begin VB.TextBox FieldsTxt 
      Height          =   285
      Index           =   0
      Left            =   1275
      Locked          =   -1  'True
      MaxLength       =   50
      TabIndex        =   0
      Top             =   360
      Width           =   1935
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      Caption         =   "图片:"
      Height          =   180
      Index           =   9
      Left            =   3615
      TabIndex        =   24
      Top             =   1935
      Width           =   870
   End
   Begin VB.Line Line2 
      BorderColor     =   &H00FFFFFF&
      X1              =   345
      X2              =   6645
      Y1              =   900
      Y2              =   900
   End
   Begin VB.Line Line1 
      X1              =   330
      X2              =   6645
      Y1              =   885
      Y2              =   885
   End
   Begin VB.Image SamplePhoto 
      BorderStyle     =   1  'Fixed Single
      Height          =   2475
      Left            =   4020
      Stretch         =   -1  'True
      Top             =   2460
      Width           =   2640
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      Caption         =   "样品描述"
      Height          =   180
      Index           =   1
      Left            =   270
      TabIndex        =   23
      Top             =   1245
      Width           =   945
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      Caption         =   "样品名称"
      Height          =   180
      Index           =   0
      Left            =   255
      TabIndex        =   22
      Top             =   405
      Width           =   945
   End
End
Attribute VB_Name = "frmPDelete"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub E_Button_Click()
If DS = False Then
   Unload Me
   Exit Sub
    Else
   frmExplorer!Command1.Value = True
   Unload Me
   frmExplorer.Show
   Exit Sub
End If
End Sub

Private Sub Form_Load()
  frmPDelete.HelpContextID = 3
  Dim X As Integer
    For X = 0 To 9
        Label1(X) = Pro(X)
    Next
    X = 0
Me.Left = (MDIForm1.Width - Me.Width) / 2 + 100
Me.Top = (MDIForm1.Height - Me.Height) / 2 - 1500
Dim DB As Database, EF As Recordset, Tempstr As String
    Set DB = OpenDatabase(SampleData)
    Set EF = DB.OpenRecordset("S_Main", dbOpenDynaset)
        Tempstr = "样品名称='" & ModifyText & "'"
        EF.FindFirst Tempstr
        For X = 0 To 9
            If Not IsNull(EF.Fields(X).Value) Then
               FieldsTxt(X).Text = EF.Fields(X).Value
            End If
        Next
        DB.Close
        OldName = FieldsTxt(0).Text
        AddBool = False
        On Error GoTo NP
        SamplePhoto.Picture = LoadPicture(FieldsTxt(9).Text)
        
        Exit Sub
NP:
       MsgBox "图片文件没找到或格式出错,不能浏览!", vbOKOnly + 16, "图片不能安装"
        On Error Resume Next
        SamplePhoto.Picture = LoadPicture(Browser + "photo\default.bmp")
        Exit Sub
End Sub


Private Sub S_Button_Click()
 '**************** 开始 *****************
  Dim TempX As Integer
      TempX = MsgBox("真的要删除[ " & FieldsTxt(0).Text & " ]样品吗?(Y/N)", vbYesNo + vbCritical + vbDefaultButton2, "确认删除")
If TempX = 6 Then
      Dim DB As Database, Tempstr As String
  Set DB = OpenDatabase(SampleData)
      Tempstr = "Delete * From S_Main Where 样品名称='" & ModifyText & "'"
      DB.Execute Tempstr
      DB.Close
      If DS = False Then
         Unload Me
         Exit Sub
      Else
         frmExplorer!Command1.Value = True
         Unload Me
         frmExplorer.Show
         Exit Sub
      End If
  Else
       Exit Sub
End If
 '**************** 结束 *****************
End Sub

⌨️ 快捷键说明

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