[Visual Basic] Private Sub cbvalue1_DropDown( _
ByVal sender As Object, _
ByVal e As EventArgs _
) Handles _
cbvalue1.DropDown, _
cbvalue2.DropDown, _
cbvalue3.DropDown, _
cbvalue4.DropDown, _
cbvalue5.DropDown, _
cbvalue6.DropDown, _
cbvalue7.DropDown
[Visual Basic] Private Sub cbvalue1_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbvalue1.DropDown, cbvalue2.DropDown, _
cbvalue3.DropDown, cbvalue4.DropDown, cbvalue5.DropDown, cbvalue6.DropDown, cbvalue7.DropDown
Try
Dim s As String = ParamNr(sender.name)
Dim nr As Integer = s
Dim param As New ComboBox
Dim op As New ComboBox
Dim val As New ComboBox
CtrlList.Clear()
Me.GetControl(Me, "cbparam" + Trim(Str(nr)), CtrlList)
param = CtrlList.Item(0)
CtrlList.Clear()
Me.GetControl(Me, "cbvalue" + Trim(Str(nr)), CtrlList)
val = CtrlList.Item(0)
dr = Me.Findrow(param.Text)
If dr.Item("Paramtype") = "Datum" Then
Dim LocalMousePosition As Point
LocalMousePosition = val.PointToClient(Cursor.Position)
Dim f As New frmCalendar
f.Top = Me.Top + val.Top + 200
f.Left = Me.Left + val.Width + 399
f.ShowDialog()
If f.DialogResult = Windows.Forms.DialogResult.OK Then
CtrlList.Clear()
Me.GetControl(Me, "cbvalue" + Trim(Str(nr)), CtrlList)
param = CtrlList.Item(0)
param.Text = f.MonthCalendar1.SelectionRange.Start.Date
param.Focus()
End If
End If
Catch ex As Exception
End Try
End Sub
Plattformen: Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition