此主题相关图片如下:修改密码问题.jpg
'窗口的AfterLoad事件代码为:
Dim cmd As New SQLCommand
Dim dt As DataTable
'Dim cmb As WinForm.ComboBox = e.Form.Controls("UserName")
Dim cmb As WinForm.TextBox = e.Form.Controls("UserName")
cmd.C
cmd.CommandText = "SET DISTINCT Name From {Users}"
dt = cmd.ExecuteReader()
For Each dr As DataRow In dt.Datarows
cmb.Value.Add(dr("Name"))
'cmb.Items.Add(dr("Name"))
Next
'cmb.SelectedIndex = 0
'cmb.ResetText = 0
''cmb.SelectAll = 0