AM电脑吧 - Win10精简版系统_Win11精简版_Win7旗舰版

Yes
查看: 4936|回复: 2
收起左侧

[其它] 实例---读取标准配置文件到下拉列表

[复制链接]
ampc8110

签到天数: 3 天

[LV.2]二兆带宽

id fuldho 发表于 2011-05-06 20:02:30
2011-05-06_195904.jpg

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 213, 186, 281, 217)
$Button1 = GUICtrlCreateButton("查询", 64, 128, 89, 33)
$Combo1 = GUICtrlCreateCombo("", 64, 24, 89, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUISetState(@SW_SHOW)
$rdini = IniReadSection('data.ini', '结果')
For $i = 1 To $rdini[0][0]
        ;MsgBox(0, '', $rdini[$i][0])
        GUICtrlSetData($Combo1, $rdini[$i][0])
Next
#EndRegion ### END Koda GUI section ###
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        $rd = GUICtrlRead($Combo1)
                        MsgBox(0, '', IniRead('data.ini', '结果', $rd, 0))
        EndSwitch
WEnd

配置文件:

data.ini

[结果]
阿木=吧主
敏=管理员
水铃=管理员
fuldho=会员

评分

参与人数 1带宽 +5 收起 理由
ampc81 + 5 很好的帖子,非常感谢.

本文地址: https://www.ampc8.com/thread-432-1-1.html
上一篇:最全的万用表使用方法
下一篇:BIOS下载网站网址汇编
回复

举报

ampc8113

签到天数: 234 天

[LV.7]七个CPU

id 曾经最美 发表于 2011-06-02 21:51:11
正在学C,AU3有时间再学吧
回复

举报

ampc81

签到天数: 644 天

[LV.9]九级电脑高手

id 发表于 2011-05-06 20:12:55
有意思,学习了.
回复

举报

您需要登录后才可以回帖 登录 | 验证注册

Powered by AMpc8.Com (晋ICP备13003365号ghs 晋公网安备 14090202000112号 |GMT+8, 2024/5/5 20:42 |
快速回复 返回顶部 返回列表