?? frmpartylist.frm
字號:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
Begin VB.Form frmPartyList
BorderStyle = 3 'Fixed Dialog
Caption = "查詢結果顯示及瀏覽"
ClientHeight = 6540
ClientLeft = 45
ClientTop = 615
ClientWidth = 9510
Icon = "frmPartyList.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6540
ScaleWidth = 9510
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin ComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 540
Left = 0
TabIndex = 1
Top = 0
Width = 9510
_ExtentX = 16775
_ExtentY = 953
ButtonWidth = 820
ButtonHeight = 794
Appearance = 1
ImageList = "ImageList1"
_Version = 327682
BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
NumButtons = 5
BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "bott1"
Object.ToolTipText = "退出系統"
Object.Tag = ""
ImageIndex = 1
EndProperty
BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = ""
Object.Tag = ""
Style = 3
MixedState = -1 'True
EndProperty
BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "bott2"
Object.ToolTipText = "打印當前記錄"
Object.Tag = ""
ImageIndex = 2
EndProperty
BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = ""
Object.Tag = ""
Style = 3
MixedState = -1 'True
EndProperty
BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "bott3"
Object.Tag = ""
ImageIndex = 3
EndProperty
EndProperty
End
Begin ComctlLib.StatusBar SBar1
Align = 2 'Align Bottom
Height = 405
Left = 0
TabIndex = 2
Top = 6135
Width = 9510
_ExtentX = 16775
_ExtentY = 714
SimpleText = ""
_Version = 327682
BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
NumPanels = 1
BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
AutoSize = 1
Object.Width = 16722
Picture = "frmPartyList.frx":0442
Key = ""
Object.Tag = ""
EndProperty
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 11.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSFlexGridLib.MSFlexGrid MskGrdMain
Bindings = "frmPartyList.frx":075C
Height = 5535
Left = 30
TabIndex = 0
Top = 570
Width = 9525
_ExtentX = 16801
_ExtentY = 9763
_Version = 327680
Cols = 17
FixedCols = 0
BackColor = 16777215
ForeColor = 8388608
AllowUserResizing= 1
End
Begin VB.Data DataForMain
Caption = "Data1"
Connect = "Access"
DatabaseName = " "
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 345
Left = 2070
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "ZBQKB"
Top = 5220
Visible = 0 'False
Width = 1695
End
Begin ComctlLib.ImageList ImageList1
Left = 1590
Top = 720
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 24
ImageHeight = 24
MaskColor = 12632256
_Version = 327682
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 3
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "frmPartyList.frx":0772
Key = ""
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "frmPartyList.frx":0A8C
Key = ""
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "frmPartyList.frx":1106
Key = ""
EndProperty
EndProperty
End
Begin VB.Menu MNUFILE
Caption = "【文件&F】"
Begin VB.Menu MNUEXIT
Caption = "退出[&X]"
End
End
Begin VB.Menu MNUPRINT
Caption = "【打印&P】"
Begin VB.Menu MNUPRINT1
Caption = "打印當前記錄[&P]"
End
End
Begin VB.Menu MNUHELP
Caption = "【幫助&H】"
Begin VB.Menu MNUNOTE
Caption = "使用說明[&N]"
End
End
End
Attribute VB_Name = "frmPartyList"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim ex As Excel.Application
Dim exwbook As Excel.WorkBook
Dim exsheet As Excel.WorkSheet
Dim exchart As Excel.Chart
Dim I, J As Integer
Private Sub Form_Load()
'MSGRID控件的初始化
On Error Resume Next
DataForMain.DatabaseName = App.Path + "\database\student.mdb"
Set recForMain = Dbstudent.OpenRecordset(sqlForParty, dbOpenSnapshot)
Set DataForMain.Recordset = recForMain
With MskGrdMain
.Row = 0
.col = 0
.ColWidth(0) = 1400
.Text = "學號"
.col = 1
.ColWidth(1) = 1000
.Text = "姓名"
.col = 2
.ColWidth(2) = 1200
.Text = "出生年月"
.col = 3
.ColWidth(3) = 900
.Text = "民族"
.col = 4
.ColWidth(4) = 2000
.Text = "院系"
.col = 5
.ColWidth(5) = 1000
.Text = "年級"
.col = 6
.ColWidth(6) = 1000
.Text = "生源"
.col = 7
.ColWidth(7) = 920
.Text = "學歷"
.col = 8
.ColWidth(8) = 1200
.Text = "通過時間"
.col = 9
.ColWidth(9) = 1200
.Text = "轉正時間"
.col = 10
.ColWidth(10) = 1200
.Text = "轉檔時間"
.col = 11
.ColWidth(11) = 2000
.Text = "轉檔地點"
End With
SBar1.Panels(1).Text = "共查詢到 " & recForMain.RecordCount & " 條記錄!"
End Sub
Private Sub MNUEXIT_Click()
On Error Resume Next
Unload Me
End Sub
Private Sub MNUNOTE_Click()
Dim TTT As String
Dim x
TTT = App.Path + "\help\djlist.txt"
x = Shell("Notepad " + TTT, 1)
End Sub
Private Sub MNUPRINT1_Click()
If MsgBox("將要處理數據,可能花費較長時間,請稍候……", vbInformation + vbOKCancel, "提示框") = vbCancel Then
Exit Sub
Screen.MousePointer = 0
Else
Set ex = CreateObject("excel.application")
Set exwbook = ex.Workbooks().Add
Set exsheet = exwbook.Worksheets("sheet1")
Dim rec As Recordset
Dim q As Integer
Screen.MousePointer = 11
Set rec = DataForMain.Recordset
'rec.MoveFirst
If rec.AbsolutePosition = -1 Then
MsgBox "無信息可供打印,退出!", vbExclamation, "錯誤信息"
GoTo 10
End If
rec.MoveLast
rec.MoveFirst
q = rec.RecordCount
ex.Caption = "學生黨建信息一覽"
ex.Cells(1, 5).Value = "學生黨建信息查詢結果報表"
ex.Cells(3, 1).Value = "學號"
ex.Cells(3, 2).Value = "姓名"
ex.Cells(3, 3).Value = "出生年月"
ex.Cells(3, 4).Value = "民族"
ex.Cells(3, 5).Value = "院系"
ex.Cells(3, 6).Value = "年級"
ex.Cells(3, 7).Value = "生源"
ex.Cells(3, 8).Value = "學歷"
ex.Cells(3, 9).Value = "通過時間"
ex.Cells(3, 10).Value = "轉正時間"
ex.Cells(3, 11).Value = "轉檔時間"
ex.Cells(3, 12).Value = "轉檔地點"
For I = 4 To q + 3
For J = 1 To 12
ex.Cells(I, J).Value = rec(J - 1).Value
Next J
rec.MoveNext
Next I
ex.Visible = True
exwbook.Saved = True
rec.MoveFirst
10:
Screen.MousePointer = vbArrow
Set exsheet = Nothing
Set exwbook = Nothing
Set ex = Nothing
'rec.MoveFirst
End If
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
Select Case Button.Key
Case "bott1"
Unload Me
Case "bott2"
Call MNUPRINT1_Click
Case "bott3"
Call MNUNOTE_Click
End Select
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -