亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

VB Combo循環加載INI文件?

VB Combo循環加載INI文件?

躍然一笑 2019-04-09 10:06:21
VB Combo循環加載INI文件
查看完整描述

3 回答

?
臨摹微笑

TA貢獻1982條經驗 獲得超2個贊

Private Declare Function icePub_getIniString Lib "icePubDll.dll" (ByVal strDefaultValue As String, ByVal strGroupName As String, ByVal strKeyName As String, ByVal strIniFilename As String, ByVal strResult As String) As Integer

Private Declare Function icePub_getIniValue Lib "icePubDll.dll" (ByVal valDefaultValue As Integer, ByVal strGroupName As String, ByVal strKeyName As String, ByVal strIniFilename As String) As Integer

Private Declare Function icePub_setIniString Lib "icePubDll.dll" (ByVal strValue As String, ByVal strGroupName As String, ByVal strKeyName As String, ByVal strIniFilename As String) As Integer

Dim val2 As Integer
Dim strVal As String

For i = 1 To 5
keyName = Key + Trim(Str(i))
'值
val2 = icePub_getIniValue(0, "Section", keyName, App.Path + "\myini.ini")
'串
strVal = icePub_getIniValue(0, "Section", keyName, App.Path + "\myini.ini")

'往Combo1里添加

Next i

'寫
a = icePub_setIniString("555", "Section", "Key1", App.Path + "\myini.ini")

http://zhidao.baidu.com/question/139238142.html
里邊下載的rar包里有dll

查看完整回答
反對 回復 2019-04-13
?
嗶嗶one

TA貢獻1854條經驗 獲得超8個贊

假如INI的內容為:
[Section1]
Key1=111
Key2=222
Key3=333

[Section]
Key1=111
Key2=222
Key3=333

[Section2]
Key1=111
Key2=222
Key3=333

Private Sub Combo1_Click()
Text1 = Mid(Combo1.Text, 6, Combo1.ListCount)
End Sub

Private Sub Command1_Click()
Open "C:\Documents and Settings\MoBin\桌面\a.ini" For Input As #1 '你自己改一下你的ini的路徑
Do While Not EOF(1)
Line Input #1, ini
If ini = "[Section]" Then
Do
Line Input #1, ini1
Combo1.AddItem ini1
Loop While (Left(ini1, 3) = "Key")
Combo1.RemoveItem Combo1.ListCount - 1
Combo1.Text = Combo1.List(0)
Exit Do
End If
Loop
Close #1
End Sub

'你附加那里沒看明白你想表達什么.



查看完整回答
反對 回復 2019-04-13
  • 3 回答
  • 0 關注
  • 1093 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號