📄 frmphcustommx.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form frmPHCustomMX
BorderStyle = 0 'None
Caption = "客户统计明细"
ClientHeight = 6750
ClientLeft = 0
ClientTop = 0
ClientWidth = 10170
LinkTopic = "Form1"
Picture = "frmPHCustomMX.frx":0000
ScaleHeight = 6750
ScaleWidth = 10170
StartUpPosition = 2 '屏幕中心
Begin VB.PictureBox Picture6
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 465
Left = 8790
Picture = "frmPHCustomMX.frx":E51E2
ScaleHeight = 465
ScaleWidth = 1020
TabIndex = 8
Top = 840
Width = 1020
End
Begin VB.PictureBox Picture5
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 450
Left = 7770
Picture = "frmPHCustomMX.frx":E6AD8
ScaleHeight = 450
ScaleWidth = 1020
TabIndex = 7
Top = 840
Width = 1020
End
Begin VB.ComboBox Combo1
Height = 300
Left = 6090
TabIndex = 2
Top = 930
Width = 1695
End
Begin MSMask.MaskEdBox Mask1
Height = 285
Left = 1650
TabIndex = 0
Top = 930
Width = 1335
_ExtentX = 2355
_ExtentY = 503
_Version = 393216
Appearance = 0
PromptInclude = 0 'False
MaxLength = 11
Mask = "9999年99月99日"
PromptChar = "_"
End
Begin MSMask.MaskEdBox Mask2
Height = 285
Left = 3840
TabIndex = 1
Top = 930
Width = 1335
_ExtentX = 2355
_ExtentY = 503
_Version = 393216
Appearance = 0
PromptInclude = 0 'False
MaxLength = 11
Mask = "9999年99月99日"
PromptChar = "_"
End
Begin MSFlexGridLib.MSFlexGrid MSFlex1
Height = 4605
Left = 570
TabIndex = 9
Top = 1560
Width = 9225
_ExtentX = 16272
_ExtentY = 8123
_Version = 393216
FixedCols = 0
AllowUserResizing= 1
Appearance = 0
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "客户名称"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 1
Left = 5220
TabIndex = 6
Top = 960
Width = 915
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "终止日期"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 3000
TabIndex = 5
Top = 960
Width = 915
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "起始日期"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 4
Left = 750
TabIndex = 4
Top = 960
Width = 915
End
Begin VB.Image Image2
Height = 375
Left = 9210
Picture = "frmPHCustomMX.frx":E8302
Top = 210
Width = 390
End
Begin VB.Image Image1
Height = 330
Left = 9630
Picture = "frmPHCustomMX.frx":E8B14
Top = 210
Width = 330
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "客户统计明细"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 225
Left = 840
TabIndex = 3
Top = 300
Width = 1365
End
End
Attribute VB_Name = "frmPHCustomMX"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim n As Integer
Dim jframe As New dframe
Dim env As rdoEnvironment
Dim cn As rdoConnection
Dim result As rdoResultset
Dim sql As String
Dim d_conn As String
Dim i As Integer
Dim Zhms(10) As Integer
Dim YWhms(10) As Integer
Dim WWhms(10) As Integer
Dim HJ(8) As Single
Private Sub Form_Load()
rgn1 = 0
n = 0
Dim Ma As Dat
Show
Open App.Path & "\base.dat" For Random As #1 Len = Len(Ma)
Do While Not EOF(1)
n = n + 1
Get #1, n, Ma
If rgn1 = 0 Then rgn1 = CreateRectRgn(Ma.sx, Ma.sy, Ma.ex, Ma.ey)
If rgn1 <> 0 Then
rgn2 = CreateRectRgn(Ma.sx, Ma.sy, Ma.ex, Ma.ey)
CombineRgn rgn1, rgn1, rgn2, 2
'释放系统资源
DeleteObject rgn2
End If
Loop
'关闭文件
Close #1
SetWindowRgn hwnd, rgn1, True
DeleteObject rgn1
''''''''''连接远程数据库SQL server''''
''''''''''连接远程数据库SQL SERVER''''
On Error GoTo errmsg
' Set env = rdoEnvironments(0)
' env.CursorDriver = rdUseOdbc
' d_conn = "uid=sa;pwd=;driver={SQL SERVER};SERVER=ntserver;database=phdatabase;"
' Set cn = env.OpenConnection(dsname:="odbc_api_demo", Prompt:="rdodriverprompt", ReadOnly:=False, Connect:=d_conn)
MSFlex1.BackColorBkg = RGB(255, 255, 255)
MSFlex1.BackColorFixed = RGB(238, 236, 218)
''''''''''查询客户'''''
sql = "select distinct 客户名称 from YWPRtable "
Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
If result.RowCount <> 0 Then
Do While Not result.EOF()
Combo1.AddItem Trim(result("客户名称"))
result.MoveNext
Loop
End If
''''电子表格设置'''''''''
MSFlex1.FormatString = "^ 日 期 |^ 客户名称 |^合同号|^总面积|^应收款额|^已收款额|^未收款额|^总画面数|^已完画面数|^未完画面数"
errmsg:
If Err.Number <> 0 Then
Exit Sub
End If
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
mX = X
mY = Y
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
frmPHCustomMX.Move frmPHCustomMX.Left - mX + X, frmPHCustomMX.Top - mY + Y
End If
Picture5.Cls
Picture6.Cls
End Sub
Private Sub Form_Paint()
'''''商品编号'''
jframe.danum = 3
jframe.rtop = 50
jframe.rleft = 35
jframe.rright = 659
jframe.rbottom = 97
jframe.ddraw frmPHCustomMX
''''''''
jframe.danum = 3
jframe.rtop = 102
jframe.rleft = 35
jframe.rright = 659
jframe.rbottom = 420
jframe.ddraw frmPHCustomMX
End Sub
Private Sub Image1_Click()
Unload Me
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -