📄 frmfixprice.frm
字号:
VERSION 5.00
Begin VB.Form frmFixPrice
BorderStyle = 3 'Fixed Dialog
Caption = "固定单价"
ClientHeight = 1335
ClientLeft = 45
ClientTop = 330
ClientWidth = 3840
HelpContextID = 21001
KeyPreview = -1 'True
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1335
ScaleWidth = 3840
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox txtFixValue
Height = 315
Left = 270
MaxLength = 12
TabIndex = 1
Top = 570
Width = 1665
End
Begin VB.CommandButton cmdcancelOk
Height = 350
Index = 0
Left = 2430
Style = 1 'Graphical
TabIndex = 2
Tag = "1001"
Top = 150
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.CommandButton cmdcancelOk
Cancel = -1 'True
Height = 350
Index = 1
Left = 2430
Style = 1 'Graphical
TabIndex = 3
Tag = "1002"
Top = 540
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.Label lblFixPrice
Caption = "固定单价(&F)"
Height = 225
Left = 270
TabIndex = 0
Top = 300
Width = 1125
End
End
Attribute VB_Name = "frmFixPrice"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'固定价格值的卡片
'作者:欧中建
'日期:1998-7-15
'ChangeFixPrice() 改变固定价格值
'ShowCard()显示卡片
'
'
Option Explicit
Private mbytDec As Byte
Private mbytCol As Byte
Private mstrFixPrice As String
Private msgFixPrice As MSFlexGrid
Public Property Let Dec(ByVal vNewValue As Byte)
mbytDec = vNewValue
End Property
Public Property Let colNo(ByVal vNewValue As Byte)
mbytCol = vNewValue
End Property
Private Sub cmdCancelOk_Click(Index As Integer)
If Index = 0 Then
ChangeFixPrice
frmAdaptCard.IsChanged = True
End If
Unload Me
End Sub
Private Sub Form_Activate()
SetHelpID Me.HelpContextID
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
BKKEY Me.ActiveControl.hwnd, vbKeyTab
End If
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn And Shift = 2 Then
cmdcancelOk(0).Value = True
End If
End Sub
Private Sub Form_Load()
Dim edtErrReturn As ErrDealType
On Error GoTo ErrHandle
' SetHelpID hwnd, 21001
Utility.LoadFormResPicture Me
mstrFixPrice = "0"
Exit Sub
ErrHandle:
edtErrReturn = Errors.ErrorsDeal
If edtErrReturn = edtResume Then
Resume
Else
On Error Resume Next
Unload Me
End If
End Sub
Private Sub Form_Paint() '划框框
FrameBox Me.hwnd, 100, 150, 2150, 1200
End Sub
'Private Function CheckIsRight(strChecked As String) As Boolean '检查输入值的正确性
'
' CheckIsRight = False
'
' If Not ContainSpecifyChar(strChecked, "-0123456789.") Or _
' (InStr(1, strChecked, "-") <> 0 And Left(strChecked, 1) <> "-") Or _
' strCount(strChecked, "-") > 1 Or strCount(strChecked, ".") > 1 Or _
' (InStr(1, strChecked, ".") <> 0 And Left(strChecked, 1) = ".") Then
'
' If Left(strChecked, 1) = "." Then Exit Function
' If Not IsNumeric(strChecked) And Trim(strChecked) <> "" Then Exit Function
'
' CheckIsRight = True
'End Function
'
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
Utility.UnLoadFormResPicture Me
End Sub
Private Sub txtFixValue_Change()
If Left(txtFixValue, 1) = "-" Then BKKEY txtFixValue.hwnd
If Not IsNum(txtFixValue.Text, mbytDec) Then
BKKEY txtFixValue.hwnd
ElseIf txtFixValue.Text <> "" Then
mstrFixPrice = TxtToDouble(txtFixValue.Text)
End If
End Sub
Public Function ChangeFixPrice() ' 改变固定价格价格的值
Dim i As Integer ', iCol As Integer
' iCol = GetColNO
With msgFixPrice
For i = 1 To .Rows - 1
If .TextMatrix(i, 1) = "√" Then
.TextMatrix(i, mbytCol) = FormatShow(mstrFixPrice, mbytDec)
.RowData(i) = -1
End If
Next
End With
End Function
Public Property Set FlexGrid(ByVal vNewValue As Variant)
Set msgFixPrice = vNewValue
End Property
Private Sub txtFixValue_KeyPress(KeyAscii As Integer)
If (Chr(KeyAscii) < "." Or Chr(KeyAscii) > "9" Or Chr(KeyAscii) = "/") And KeyAscii <> vbKeyBack Then KeyAscii = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -