?? mfrm_select.frm
字號(hào):
VERSION 5.00
Begin VB.Form mFrm_Select
BorderStyle = 1 'Fixed Single
Caption = "選擇單據(jù):"
ClientHeight = 1515
ClientLeft = 45
ClientTop = 330
ClientWidth = 4590
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1515
ScaleWidth = 4590
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton CmdCancel
Cancel = -1 'True
Caption = "取消(&C)"
Height = 375
Left = 2910
TabIndex = 5
Top = 990
Width = 1275
End
Begin VB.CommandButton CmdOk
Caption = "確定(&O)"
Height = 375
Left = 1410
TabIndex = 4
Top = 990
Width = 1275
End
Begin VB.ComboBox CmbName
Height = 300
Left = 1290
TabIndex = 3
Top = 540
Width = 3105
End
Begin VB.ComboBox CmbType
Height = 300
Left = 1290
Style = 2 'Dropdown List
TabIndex = 1
Top = 120
Width = 3105
End
Begin VB.Image ImgDelete
Height = 375
Left = 570
Picture = "mFrm_Select.frx":0000
Stretch = -1 'True
ToolTipText = "刪除些單據(jù)"
Top = 1005
Width = 495
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "單據(jù)名稱(&N):"
Height = 180
Left = 90
TabIndex = 2
Top = 570
Width = 1170
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "單據(jù)類別(&T):"
Height = 180
Left = 90
TabIndex = 0
Top = 180
Width = 1170
End
End
Attribute VB_Name = "mFrm_Select"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public mScreenID As Integer
Public mID As Integer
Public mName As String
Dim mFlagNew As Boolean
Private Sub CmbType_Click()
With CmbType
CmbName.Clear
If .ListIndex >= 0 Then
mScreenID = .ItemData(.ListIndex)
End If
End With
End Sub
Private Sub CmdCancel_Click()
mID = -1
Me.Hide
End Sub
Private Sub CmdOK_Click()
With CmbName
If mFlagNew Then
CmbName.Text = Trim(CmbName.Text)
If CmbName.Text = "" Then
MsgBox "請輸入單據(jù)名稱!", vbExclamation, Me.Caption
CmbName.SetFocus
Exit Sub
End If
mID = 0
mName = .Text
Else
If CmbName.ListIndex = -1 Then
MsgBox "請選擇單據(jù)名稱!", vbExclamation, Me.Caption
CmbName.SetFocus
Exit Sub
Else
mID = .ItemData(.ListIndex)
mName = CmbName.Text
End If
End If
End With
Me.Hide
End Sub
Public Sub SetFlag(Optional tmpNew As Boolean = True, Optional mOldType As Integer = -1, Optional bOldName As String = "")
mFlagNew = tmpNew: CmbName.Text = ""
CmbType.AddItem "演示數(shù)據(jù)", 0
If CmbType.ListCount > 0 Then CmbType.ListIndex = 0
Call CmbType_Click
Me.Caption = "選擇單據(jù):" & " - " & IIf(tmpNew, IIf(mOldType > 0, "另存為", "新建"), "打開")
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If ImgDelete.Visible Then ImgDelete.BorderStyle = 0
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set mFrm_Select = Nothing
End Sub
Private Sub ImgDelete_Click()
Dim tmpID As Integer, strsql As String
On Error GoTo error
With CmbName
If .ListIndex = -1 Then
MsgBox "請選擇單據(jù)名稱!", vbExclamation, Me.Caption
.SetFocus
Exit Sub
End If
tmpID = .ItemData(.ListIndex)
End With
strsql = "Delete From " & g_TableText & " Where FID=" & tmpID & vbCrLf & _
"Delete From " & g_TableLine & " Where FID=" & tmpID & vbCrLf & _
"Delete From " & g_Table & " Where FID=" & tmpID
Call CmbType_Click
MsgBox "刪除成功!"
Exit Sub
error:
ErrInfo "刪除失敗!"
End Sub
Private Sub ImgDelete_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If ImgDelete.Visible Then ImgDelete.BorderStyle = 1
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -