国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
可編輯的MSFlexGrid:
Private Sub Form_Load()
Dim fs As New FileSystemObject
Dim txtf As TextStream
Dim path As String, Line As String
Dim Cells() As String, Idx As Integer

path = App.path
If Right(path, 1) <> "" Then path = path & ""
Set txtf = fs.OpenTextFile(path & "score.txt", ForReading)

With MSFlexGrid1
.AllowUserResizing = flexResizeColumns ' 可以改變列寬
.Cols = 5 ' 列數(shù) = 5
.Rows = 1 ' 行數(shù)暫訂 1
.FixedCols = 0 ' 固定列 = 0

' 設(shè)置標(biāo)題
.TextMatrix(0, 0) = "學(xué)號(hào)"
.TextMatrix(0, 1) = "姓名"
.TextMatrix(0, 2) = "語(yǔ)文"
.TextMatrix(0, 3) = "數(shù)學(xué)"
.TextMatrix(0, 4) = "英語(yǔ)"

.ColAlignment(0) = flexAlignRightCenter
.ColAlignment(2) = flexAlignRightCenter
.ColAlignment(3) = flexAlignRightCenter
.ColAlignment(4) = flexAlignRightCenter
End With


Idx = 1
While Not txtf.AtEndOfStream
Line = txtf.ReadLine
Cells = Split(Line, ",")
MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1 ' 增加一行
' 將Cells(0°4) 指定給TextMatrix(Idx, 0°4)
For I = 0 To UBound(Cells)
MSFlexGrid1.TextMatrix(Idx, I) = Cells(I)
Next
Idx = Idx + 1
Wend
txtf.Close
End Sub


Private Sub MSFlexGrid1_Click()
Dim c As Integer, r As Integer

With MSFlexGrid1
c = .Col: r = .Row
Text1.Left = .Left + .ColPos©
Text1.Top = .Top + .RowPos®
If .Appearance = 1 Then
Text1.Left = Text1.Left + 2 * Screen.TwipsPerPixelX
Text1.Top = Text1.Top + 2 * Screen.TwipsPerPixelY
End If
Text1.Width = .ColWidth©
Text1.Height = .RowHeight®

Text1.Text = .Text
End With
Text1.Visible = True
Text1.SetFocus
End Sub


Private Sub MSFlexGrid1_Scroll()
Text1.Visible = False
End Sub


Private Sub Text1_Change()
MSFlexGrid1.Text = Text1.Text
End Sub


Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then ' 按下 Enter 鍵
Text1.Visible = False
End If
End Sub


Private Sub Text1_LostFocus()
Text1.Visible = False
End Sub



其中score.txt文件內(nèi)容為:


850301,陳桶一,90,76,98
850302,黃光權(quán),58,77,75
850303,胡生妙,41,14,33
850304,王為全,95,97,87
850305,李日正,59,66,57
850306,劉德昌,28,11,33
850307,方正一,98,100,100
850308,劉康保,0,0,10
850309,謝掬花,95,74,89
850310,王美蘭,41,46,49
850311,徐小當(dāng),91,99,84
850312,葉小毛,0,10,0
850313,林東海,92,92,88
850314,林大陽(yáng),35,19,29
850315,鐘德級(jí),98,90,91
850316,劉力錦,47,50,55
850317,方小房,94,94,100
850318,劉紀(jì)成,79,85,77
850319,李普三,84,74,58
850320,劉一心,54,57,64
850321,方日通,83,80,94
850322,劉順成,71,65,73
850323,謝利利,20,25,10
850324,王涵合,93,100,90
850325,徐佳佳,68,56,39
850326,李紅仁,25,24,0
850327,林大玉,87,77,92
850328,林玉成,64,90,59
850329,鐘百達(dá),0,0,20
Edited by: LionCSQ
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
在VB中把EXCEL文件導(dǎo)入MSFLEXGRID
在VB+Access系統(tǒng)中實(shí)現(xiàn)多項(xiàng)條件查詢
怎樣添加一個(gè)下拉框到msflexgrid
vb MSFlexGrid數(shù)據(jù)控件數(shù)據(jù)排序
MSFlexGrid控件的事件與方法件與方法
VB表格控件總覽與例程分析
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服