nomainwin
dim months$(12), days$(11)
for n = 1 to 12 : months$(n) = right$("0"+str$(n),2) : next
days$(1) = "01-10":days$(2) = "11-20":days$(3) = "21-31"
for n = 1 to 10 step 1: years$(n) = str$(n*10+1910)+"'s" : next
WindowWidth = 400 : WindowHeight = 400
statictext #student.statictext6, "Date of Birth", 100, 5, 99, 20
statictext #student.statictext7, "Mo Day Year", 70, 20, 160, 40
combobox #student.mocb, months$(,[mos],60,40,40,60
combobox #student.dacb, days$(,[days],107,40,50,50
combobox #student.yrcb, years$(,[years],165,40,60,300
open "Enter Date" for window as #student
#student, "font ms_sans_serif 8"
#student, "trapclose [studentEnd]"
wait
[studentEnd]
#student.mocb, "selection? mx$"
#student.dacb, "selection? dx$"
#student.yrcb, "selection? decade$"
notice mx$;" ";dx$;" ";decade$
close #student
end
[mos]
#student.mocb, "selection? mx$"
wait
[days]
#student.dacb, "selection? da$"
if instr(da$,"-") = 0 then wait
#student.dacb, "selectionindex? dx"
select dx
case 1 : m = 0 : p = 10
case 2 : m = 10 : p = 10
case 3 : m = 20 : p = 11
end select
for n = 1 to p
days$(n) = right$("0"+str$(n+m),2)
next
#student.dacb, "selectindex 0"
#student.dacb,"reload"
#student.dacb,"!";da$
wait
[years]
#student.yrcb,"selection? decade$"
if right$(decade$,1) <> "s" then wait
decade = val(left$(decade$,4))
for n = 1 to 10 :years$(n) = str$(decade+n-1):next
#student.yrcb, "selectindex 0"
#student.yrcb,"reload"
#student.yrcb,"!";decade$
wait
nomainwin
dim days$(31)
for n = 1 to 31 : days$(n) = right$("0"+str$(n),2) : next
WindowWidth = 400 : WindowHeight = 400
combobox #student.dacb, days$(),[days],107,40,50,200
open "Enter Date" for window as #student
#student, "font ms_sans_serif 8"
#student, "trapclose [quit]"
hdacb = hwnd(#student.dacb)
calldll #user32, "SendMessageA", hdacb as ulong, _CB_SETMINVISIBLE as long, _
31 as long, 0 as long, ret as void
wait
[quit]
close #student
end nomainwin
dim months$(12), days$(11)
for n = 1 to 12 : months$(n) = right$("0"+str$(n),2) : next
days$(1) = "01-10":days$(2) = "11-20":days$(3) = "21-31"
for n = 1 to 10 step 1: years$(n) = str$(n*10+1910)+"'s" : next
WindowWidth = 400 : WindowHeight = 400
statictext #student.statictext6, "Date of Birth", 100, 5, 99, 20
statictext #student.statictext7, "Mo Day Year", 70, 20, 160, 40
combobox #student.mocb, months$(,[mos],60,40,40,60
combobox #student.dacb, days$(,[days],107,40,50,50
combobox #student.yrcb, years$(,[years],165,40,60,300
open "Enter Date" for window as #student
#student, "font ms_sans_serif 8"
#student, "trapclose [studentEnd]"
wait
[studentEnd]
#student.mocb, "selection? mx$"
#student.dacb, "selection? dx$"
#student.yrcb, "selection? decade$"
notice mx$;" ";dx$;" ";decade$
close #student
end
[mos]
#student.mocb, "selection? mx$"
wait
[days]
#student.dacb, "selection? da$"
if instr(da$,"-") = 0 then wait
#student.dacb, "selectionindex? dx"
select dx
case 1 : m = 0 : p = 10
case 2 : m = 10 : p = 10
case 3 : m = 20 : p = 11
end select
for n = 1 to p
days$(n) = right$("0"+str$(n+m),2)
next
#student.dacb, "selectindex 0"
#student.dacb,"reload"
#student.dacb,"!";da$
hdacb = hwnd(#student.dacb)
calldll #user32, "SendMessageA", hdacb as ulong, _CB_SHOWDROPDOWN as long, _
1 as long, 0 as long, ret as void
wait
[years]
#student.yrcb,"selection? decade$"
if right$(decade$,1) <> "s" then wait
decade = val(left$(decade$,4))
for n = 1 to 10 :years$(n) = str$(decade+n-1):next
#student.yrcb, "selectindex 0"
#student.yrcb,"reload"
#student.yrcb,"!";decade$
hyrcb = hwnd(#student.yrcb)
calldll #user32, "SendMessageA", hyrcb as ulong, _CB_SHOWDROPDOWN as long, _
1 as long, 0 as long, ret as void
wait