📄 ufawengaozhi.ctl
字号:
ForeColor = &H000000FF&
Height = 210
Index = 22
Left = 8010
TabIndex = 35
Top = 7785
Visible = 0 'False
Width = 525
End
End
Begin VB.PictureBox picButtons
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 300
Left = 930
ScaleHeight = 300
ScaleWidth = 8370
TabIndex = 0
Top = 8220
Width = 8370
Begin VB.CommandButton cmdList
BackColor = &H00E0E0E0&
Caption = "列表(&L)"
Height = 300
Left = 4675
Style = 1 'Graphical
TabIndex = 7
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdRefresh
BackColor = &H00E0E0E0&
Caption = "刷新(&R)"
Height = 300
Left = 3521
Style = 1 'Graphical
TabIndex = 6
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdDelete
BackColor = &H00E0E0E0&
Caption = "删除(&D)"
Height = 300
Left = 2367
Style = 1 'Graphical
TabIndex = 5
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdUpdate
BackColor = &H00E0E0E0&
Caption = "更新(&U)"
Height = 300
Left = 1213
Style = 1 'Graphical
TabIndex = 4
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdAdd
BackColor = &H00E0E0E0&
Caption = "添加(&A)"
Height = 300
Left = 59
Style = 1 'Graphical
TabIndex = 3
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdPrint
BackColor = &H00E0E0E0&
Caption = "打印稿纸(&D)"
Height = 300
Left = 5850
Style = 1 'Graphical
TabIndex = 2
Top = 0
Width = 1125
End
Begin VB.CommandButton cmdPrint1
BackColor = &H00E0E0E0&
Caption = "发文(&P)"
Height = 300
Left = 7050
Style = 1 'Graphical
TabIndex = 1
Top = 0
Width = 1125
End
End
Begin MSAdodcLib.Adodc datPrimaryRS
Height = 330
Left = 0
Top = 7680
Visible = 0 'False
Width = 1500
_ExtentX = 2646
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = " "
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 1680
Top = 7680
Visible = 0 'False
Width = 1935
_ExtentX = 3413
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "UFaWenGaoZhi.ctx":0015
CausesValidation= 0 'False
Height = 8055
Left = 0
TabIndex = 57
Top = 0
Visible = 0 'False
Width = 9855
_ExtentX = 17383
_ExtentY = 14208
_Version = 393216
AllowUpdate = 0 'False
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "发 文"
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
End
Attribute VB_Name = "UFaWenGaoZhi"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Public pIP As String
Public pConn As String
Dim mvBookmark As Variant
Dim strUserName As String
Private Sub cmdGoto_Click()
Dim i As Integer
Dim strID As String
If Not (datPrimaryRS.Recordset.BOF Or datPrimaryRS.Recordset.EOF) Then
strID = DataGrid1.Columns(0).Text
datPrimaryRS.Recordset.MoveFirst
datPrimaryRS.Recordset.Find "ID=" & strID
End If
setVisible False
End Sub
Private Sub cmdList_Click()
Dim i As Integer
setVisible True
'保存记录位置
If Not (datPrimaryRS.Recordset.BOF Or datPrimaryRS.Recordset.EOF) Then
mvBookmark = datPrimaryRS.Recordset.Bookmark
'刷新记录集
cmdRefresh_Click
datPrimaryRS.Recordset.MoveFirst
End If
'刷新Grid
' Set DataGrid1.DataSource = datPrimaryRS.Recordset
DataGrid1.Refresh
For i = 0 To DataGrid1.Columns.Count - 1
If i = 0 Or i = 11 Or i = 17 Or i = 19 Then
DataGrid1.Columns(i).Visible = True
Else
DataGrid1.Columns(i).Visible = False
End If
Next
DataGrid1_InitColumnProps
End Sub
Private Sub cmdPrint_Click()
' Dim strPrint As String
' strPrint = ""
' For i = 0 To 21
' strPrint = strPrint & txtFields(i).Text & Chr(255)
' Next
' EXEPrint "FaWenGaoZhi", strPrint
Dim oWrd As Object, i As Integer
Set oWrd = CreateObject("Word.Application")
oWrd.Visible = True
oWrd.Activate
oWrd.Documents.Add
With oWrd.ActiveDocument.PageSetup
.TopMargin = 72
.BottomMargin = 66
.LeftMargin = 55
.RightMargin = 66
.Gutter = 28.35
.HeaderDistance = 30
.FooterDistance = 50
.PageWidth = 595.35
.PageHeight = 841.95
End With
With oWrd.Selection
With .ParagraphFormat
.Alignment = 3
.TabStops.Add Position:=320, Alignment:=0, Leader:=0
End With
.Font.Size = 14 '四号
.Font.Name = "宋体"
.Font.Bold = False
'会签
With .ParagraphFormat
.SpaceBefore = 146
.SpaceAfter = 4
.LeftIndent = 42
End With
.TypeText txtFields(8).Text
.TypeParagraph
'事由
Select Case Len(txtFields(9).Text)
Case Is <= 28
With .ParagraphFormat
.SpaceBefore = 4
.SpaceAfter = 4
.LeftIndent = 42
End With
Case Is <= 38
.Font.Size = 10.5 '五号
With .ParagraphFormat
.SpaceBefore = 12
.SpaceAfter = 12
.LeftIndent = 42
End With
Case Is > 38
.Font.Size = 10.5 '五号
With .ParagraphFormat
.SpaceBefore = 4
.SpaceAfter = 2
.LeftIndent = 42
End With
End Select
.TypeText txtFields(9).Text
.TypeParagraph
.Font.Size = 14 '四号
'主送机关、附件
With .ParagraphFormat
.SpaceBefore = 4
.SpaceAfter = 4
.LeftIndent = 71
End With
.TypeText Text:=txtFields(10).Text & vbTab & txtFields(11).Text
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -