标题: 如何将DropListBox里选择的值存入相关变量 [打印本页] 作者: bb64844866 时间: 2008-12-5 10:24 标题: 如何将DropListBox里选择的值存入相关变量 我看了下这个控件的例子说明,但是搞不清楚如何把选择完的值赋值给相关变量。。。等高人指点下
代码如下:
Dim DropListBox1() as String
Dim x as Integer
ReDim DropListBox1(3)
For x=0 to 2
DropListBox1(x)=Chr(65+x) & ":"
Next x
Begin Dialog UserDialog 186, 62, "SQABasic Dialog Box"
Text 8, 4, 42, 8, "Drive:", .Text3
DropListBox 8, 16, 95, 44, DropListBox1(), .DropListBox1
OKButton 124, 6, 54, 14
CancelButton 124, 26, 54, 14
End Dialog
Dim mydialog as UserDialog
On Error Resume Next
Dialog mydialog
If Err=102 then
MsgBox "Dialog box canceled."
End If