|
发表于 2010-1-4 11:29:06
|
显示全部楼层
下面
本帖最后由 sanmoking 于 2010-1-4 11:31 编辑
另外给你个窗体尺寸的思路,根据不同的控件数量,窗体大小也会不一样:
下面代码仅是一部分,不能直接运行的。
Dim $Radiooo[100]
$Form0 = GUICreate("请选择", 160, UBound($usernameall)*20+50)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form0Close")
If UBound ($usernameall) > 1 Then
$Group0 = GUICtrlCreateGroup("当前登录用户", 8, 8, 143, UBound($usernameall)*20+5)
For $ioop = 1 To UBound ($usernameall)-1
$Radiooo[$ioop] = GUICtrlCreateRadio($usernameall[$ioop], 15, $ioop*20+8, 100, 17)
Next
GUICtrlSetState($Radiooo[1], $GUI_CHECKED)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Else
$Group0 = GUICtrlCreateGroup("没有发现用户", 8, 8, 143, UBound($usernameall)*20+5)
GUICtrlCreateGroup("", -99, -99, 1, 1)
EndIf
$Buttonn1 = GUICtrlCreateButton("刷新", 8, UBound($usernameall)*20+18, 69, 25)
GUICtrlSetOnEvent(-1, "Buttonn1Click")
$Buttonn2 = GUICtrlCreateButton("确定", 83,UBound($usernameall)*20+18, 69, 25)
GUICtrlSetOnEvent(-1, "Buttonn2Click")
GUISetState(@SW_SHOW) |
|