1.VBçListviewä¿å读å
VBçListviewä¿å读å
å®æ´ä»£ç 注ï¼Listviewå®ä¹äº4个å,源码文华 策略 源码èªå·±éè¦å åæ¹ä¸å°±å¥½Option Explicit
'读åINIæ件
Private Declare Function GetPrivateProfileString Lib "kernel" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Private Declare Function WritePrivateProfileString Lib "kernel" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As LongPrivate Sub Form_Load()
Randomize
End SubPrivate Sub éæºå¼_Click()
Dim i As Integer, j As Integer, lv As ListItem
ListView1.ListItems.Clear
For i = 0 To
Set lv = ListView1.ListItems.Add(, , i + 1)
For j = 0 To 2
lv.ListSubItems.Add , , CInt(Rnd * )
Next j
Next i
End SubPrivate Sub ä¿å_Click()
Dim si As Integer, sj As Integer, tmpstr As String
If ListView1.ListItems.Count = 0 Then MsgBox "没æå¯ä¿åçå 容", vbInformation, "æ示": Exit Sub
tmpstr = ListView1.ListItems.Count
WritePrivateProfileString "ç»è®¡é¡¹", "æ»è¡æ°", tmpstr, App.Path & "\ABC.ini"
tmpstr = ListView1.ListItems(1).ListSubItems.Count
WritePrivateProfileString "ç»è®¡é¡¹", "æ»åæ°", tmpstr, App.Path & "\ABC.ini"
With ListView1.ListItems
For si = 1 To .Count
WritePrivateProfileString "第" & si & "è¡", "第1å", .Item(si).Text, App.Path & "\ABC.ini"
For sj = 1 To .Item(si).ListSubItems.Count
WritePrivateProfileString "第" & si & "è¡", "第" & sj + 1 & "å", .Item(si).SubItems(sj), App.Path & "\ABC.ini"
Next sj
Next si
End With
MsgBox "ä¿åæåï¼", vbInformation, "æ示"
End SubPrivate Sub 读å_Click()
Dim sr As Integer, sc As Integer, li As Integer, lj As Integer, tmptxt As String, lvs As ListItem
tmptxt = Space$()
GetPrivateProfileString "ç»è®¡é¡¹", "æ»è¡æ°", "0", tmptxt, , App.Path & "\ABC.ini"
sr = CInt(tmptxt) 'æ»è¡æ°
tmptxt = Space$()
GetPrivateProfileString "ç»è®¡é¡¹", "æ»è¡æ°", "0", tmptxt, , App.Path & "\ABC.ini"
sc = CInt(tmptxt)
If sr = 0 Then
MsgBox "æ»è¡æ°ä¸ºé¶å¦"
Exit Sub
Else
ListView1.ListItems.Clear
End If
For li = 1 To sr
For lj = 1 To sc 'è¿éä½ çå表
tmptxt = Space$()
GetPrivateProfileString "第" & li & "è¡", "第" & lj & "å", "", tmptxt, , App.Path & "\ABC.ini"
If lj = 1 Then
Set lvs = ListView1.ListItems.Add(, , tmptxt)
Else
lvs.ListSubItems.Add , , tmptxt
End If
Next lj
Next li
End Sub
2024-11-29 22:39967人浏览
2024-11-29 22:331260人浏览
2024-11-29 22:091585人浏览
2024-11-29 21:482726人浏览
2024-11-29 20:19422人浏览
2024-11-29 20:002886人浏览
1.UE4-pak文件2.FBX转uasset,Png转uasset3.UE相关杂项笔记4.通达信.net文件如何改成.pak 的不是单纯的重命名,要求可以使用5.虚幻4(ue4)引擎加密pak解包教
1.区块链源代码如何查询,币开源代码哪里查区块链源代码如何查询,币开源代码哪里查 如何查看spring源码 1.准备工作:在官网上下载了Spring源代码之后,导入Eclipse,以方便查询。
1.NodeController 源码分析2.vue+leaflet示例:视频监控播放(附源码下载)3.FLINK 部署阿里云)、监控 和 源码案例4.[源码和文档分享]基于Libpcap实现的局域网