funkheads
Nov 30th, 1999, 08:27 AM
ok. i am working on an alarm program and i need to use listboxes to set the time. here is what my interface look like:
http://www.mikey-d.com/view/tyme_listboxes.jpg
what i need to do is use the listboxes to scroll to a certain hour, minute, and second. then i need to place the "time" in a text box. but i want to be able to place it without having to select the item (number) in the listbox. is there any way to say
textbox.text = "the number that is showing in the window" ???
here is my code so far:
Dim h As String
Dim m As String
Dim s As String
Dim ap As String
h = lstHour.Text
m = lstMin.Text
s = lstSec.Text
If optAM.Value = True Then
ap = "am"
ElseIf optPM.Value = True Then
ap = "pm"
End If
txtTime.Text = h & ":" & m & ":" & s & " " & ap
i have the AM and PM parts taken care of. i assume i need to change lst"whatever".text to something else. am i making any sense? if not, let me know and i will try to help with further explanation. any help will be greatly appreciated. thank you.
--michael
http://www.mikey-d.com/view/tyme_listboxes.jpg
what i need to do is use the listboxes to scroll to a certain hour, minute, and second. then i need to place the "time" in a text box. but i want to be able to place it without having to select the item (number) in the listbox. is there any way to say
textbox.text = "the number that is showing in the window" ???
here is my code so far:
Dim h As String
Dim m As String
Dim s As String
Dim ap As String
h = lstHour.Text
m = lstMin.Text
s = lstSec.Text
If optAM.Value = True Then
ap = "am"
ElseIf optPM.Value = True Then
ap = "pm"
End If
txtTime.Text = h & ":" & m & ":" & s & " " & ap
i have the AM and PM parts taken care of. i assume i need to change lst"whatever".text to something else. am i making any sense? if not, let me know and i will try to help with further explanation. any help will be greatly appreciated. thank you.
--michael