📄 frmphyewu.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmPHYeWu
BorderStyle = 0 'None
Caption = "喷绘业务情况输入"
ClientHeight = 6855
ClientLeft = 0
ClientTop = 0
ClientWidth = 10155
LinkTopic = "Form1"
Picture = "frmPHYeWu.frx":0000
ScaleHeight = 6855
ScaleWidth = 10155
StartUpPosition = 2 '屏幕中心
Begin VB.PictureBox Picture1
BorderStyle = 0 'None
Height = 615
Left = 930
Picture = "frmPHYeWu.frx":E51E2
ScaleHeight = 41
ScaleMode = 3 'Pixel
ScaleWidth = 44
TabIndex = 7
Top = 780
Width = 660
End
Begin VB.PictureBox Picture2
BorderStyle = 0 'None
Height = 615
Left = 1830
Picture = "frmPHYeWu.frx":E68FC
ScaleHeight = 41
ScaleMode = 3 'Pixel
ScaleWidth = 44
TabIndex = 6
Top = 780
Width = 660
End
Begin VB.PictureBox Picture3
BorderStyle = 0 'None
Height = 615
Left = 2760
Picture = "frmPHYeWu.frx":E8016
ScaleHeight = 41
ScaleMode = 3 'Pixel
ScaleWidth = 44
TabIndex = 5
Top = 780
Width = 660
End
Begin VB.PictureBox Picture4
BorderStyle = 0 'None
Height = 615
Left = 3720
Picture = "frmPHYeWu.frx":E9730
ScaleHeight = 41
ScaleMode = 3 'Pixel
ScaleWidth = 44
TabIndex = 4
Top = 780
Width = 660
End
Begin VB.PictureBox Picture5
BorderStyle = 0 'None
Height = 615
Left = 4575
Picture = "frmPHYeWu.frx":EAE4A
ScaleHeight = 41
ScaleMode = 3 'Pixel
ScaleWidth = 44
TabIndex = 3
Top = 780
Width = 660
End
Begin VB.PictureBox Picture6
BorderStyle = 0 'None
Height = 615
Left = 5445
Picture = "frmPHYeWu.frx":EC564
ScaleHeight = 41
ScaleMode = 3 'Pixel
ScaleWidth = 44
TabIndex = 2
Top = 780
Width = 660
End
Begin VB.PictureBox Picture7
BorderStyle = 0 'None
Height = 615
Left = 6300
Picture = "frmPHYeWu.frx":EDC7E
ScaleHeight = 41
ScaleMode = 3 'Pixel
ScaleWidth = 44
TabIndex = 1
Top = 780
Width = 660
End
Begin MSComctlLib.ListView ListView1
Height = 4635
Left = 3120
TabIndex = 8
Top = 1590
Width = 6705
_ExtentX = 11827
_ExtentY = 8176
MultiSelect = -1 'True
LabelWrap = -1 'True
HideSelection = -1 'True
FlatScrollBar = -1 'True
GridLines = -1 'True
_Version = 393217
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 0
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 0
End
Begin MSComctlLib.TreeView TreeView1
Height = 4635
Left = 570
TabIndex = 9
Top = 1590
Width = 2535
_ExtentX = 4471
_ExtentY = 8176
_Version = 393217
LabelEdit = 1
Style = 5
BorderStyle = 1
Appearance = 0
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSComctlLib.ImageList ImageList1
Left = 0
Top = 0
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 14
ImageHeight = 17
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 2
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmPHYeWu.frx":EF398
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmPHYeWu.frx":EF6DC
Key = ""
EndProperty
EndProperty
End
Begin VB.Image Image2
Height = 375
Left = 9180
Picture = "frmPHYeWu.frx":EFA30
Top = 210
Width = 390
End
Begin VB.Image Image1
Height = 330
Left = 9600
Picture = "frmPHYeWu.frx":F0242
Top = 210
Width = 330
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "喷绘业务情况管理"
ForeColor = &H0000FFFF&
Height = 285
Left = 930
TabIndex = 0
Top = 300
Width = 1845
End
End
Attribute VB_Name = "frmPHYeWu"
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
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''''
ListView1.ColumnHeaders.Clear
ListView1.ListItems.Clear
ListView1.FullRowSelect = True
ListView1.HotTracking = True
ListView1.View = lvwReport
'ListView1.ColumnHeaders.Add , , " "
Set clm = ListView1.ColumnHeaders.Add(, , "日 期", ListView1.width / 5)
Set clm = ListView1.ColumnHeaders.Add(, , "合同号", ListView1.width / 7)
Set clm = ListView1.ColumnHeaders.Add(, , "客户名称", ListView1.width / 5)
Set clm = ListView1.ColumnHeaders.Add(, , "应收款", ListView1.width / 6)
Set clm = ListView1.ColumnHeaders.Add(, , "已收款", ListView1.width / 6)
Set clm = ListView1.ColumnHeaders.Add(, , "未收款", ListView1.width / 6)
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)
' ''''''''''
Set TreeView1.ImageList = ImageList1
Set Tree = TreeView1.Nodes.Add(, , "ffff", "合同号", 1)
sql = "select * from fileserial where 合同级别='合同号'"
Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
i = 1
If result.RowCount <> 0 Then
Do While Not result.EOF()
Set TreeView1.ImageList = ImageList1
Set TreeSub1 = TreeView1.Nodes.Add(Tree, tvwChild, "ffff" & Str(i), result("合同号"))
TreeSub1.Image = 1
TreeSub1.EnsureVisible
result.MoveNext
i = i + 1
Loop
End If
'''''''''初始化控件listview1......
errmsg:
If Err.Number <> 0 Then
Dim HeTongNumber(2) As String
HeTongNumber(0) = "13151"
HeTongNumber(1) = "13152"
For i = 0 To 1
Set TreeView1.ImageList = ImageList1
Set TreeSub1 = TreeView1.Nodes.Add(Tree, tvwChild, "ffff" & Str(i), HeTongNumber(i))
TreeSub1.Image = 1
TreeSub1.EnsureVisible
Next i
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
frmPHYeWu.Move frmPHYeWu.Left - mX + X, frmPHYeWu.Top - mY + Y
End If
Picture2.Cls
Picture3.Cls
Picture4.Cls
Picture5.Cls
Picture6.Cls
Picture7.Cls
Picture1.Cls
End Sub
Private Sub Form_Paint()
'''''商品编号'''
jframe.danum = 3
jframe.rtop = 50
jframe.rleft = 35
jframe.rright = 659
jframe.rbottom = 97
jframe.ddraw frmPHYeWu
''''''''
jframe.danum = 3
jframe.rtop = 102
jframe.rleft = 35
jframe.rright = 659
jframe.rbottom = 420
jframe.ddraw frmPHYeWu
End Sub
Private Sub Image1_Click()
Unload Me
End Sub
Private Sub Image2_Click()
frmPHYeWu.WindowState = 1
End Sub
Private Sub ListView1_DblClick()
On Error GoTo errmsg
YWFlagh = 2
Dim YWPRtext As String
If ListView1.ListItems.Count <> 0 Then
YWPRtext = ListView1.SelectedItem.SubItems(1)
sql = "select * from YWPRtable where 合同号='" & Trim(YWPRtext) & "' and 日期='" & Trim(ListView1.SelectedItem.Text) & "'"
'MsgBox sql
Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
If result.RowCount <> 0 Then
YWPRtableText(0) = Trim(result("日期"))
YWPRtableText(1) = Trim(result("合同号"))
YWPRtableText(2) = Trim(result("客户名称"))
YWPRtableText(3) = Trim(result("单价"))
YWPRtableText(4) = Trim(result("总面积"))
YWPRtableText(5) = Trim(result("应收款额"))
YWPRtableText(6) = Trim(result("已收款额"))
YWPRtableText(7) = Trim(result("未收款额"))
YWPRtableText(8) = Trim(result("业务员"))
YWPRtableText(9) = Trim(result("签单人"))
YWPRtableText(10) = Trim(result("欠款审核"))
End If
sql = "select * from YWSEtable where 合同号='" & Trim(YWPRtext) & "' and 日期='" & Trim(ListView1.SelectedItem.Text) & "'"
Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
If result.RowCount <> 0 Then
result.MoveLast
YWSErows = result.RowCount
result.MoveFirst
End If
i = 1
If result.RowCount <> 0 Then
Do While Not result.EOF()
YWSEtableText1(i) = Trim(result("文件序列"))
YWSEtableText2(i) = Trim(result("画面规格"))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -