m?dia calculation
Posted: Mon Jun 06, 2011 2:07 pm
Program:
Object formulario as Form
BorderStyle=2
center
Height=300
Width=800
caption="M?dia semal e mensal das An?lises"
Object grupo as groupbox
height=100
top=10
left=10
Caption="Semana"
Object combo as ComboBox
Top=15
left=5
AddItem("Segunda-Feira")
AddItem("Ter?a-Feira")
AddItem("Quarta-Feira")
AddItem("Quinta-Feira")
AddItem("Sexta-Feira")
End Object
Object btn1 as Button
caption="Selecionar"
left=30
top=50
OnClick=calcular
End Object
End Object
Object grupo1 as groupbox
height=100
Top=120
Left=10
Caption="N? Pacientes"
Object combo1 as ComboBox
Top=15
Left=5
AddItem("1")
AddItem("2")
AddItem("3")
AddItem("4")
AddItem("5")
AddItem("6")
AddItem("7")
AddItem("8")
AddItem("9")
AddItem("10")
End Object
Object btn3 as Button
caption="Selecionar"
left=30
top=50
OnClick=calcular1
End Object
End Object
Object grupo2 as groupBox
left=200
Top=10
Height=210
Caption="Resultado"
Object lstbx as ListBox
Left=10
Top=15
Height=140
Width=90
End Object
Object lstbx1 as ListBox
Left=110
Top=15
Height=140
Width=70
End Object
Object btn2 as Button
caption="Apagar"
left=100
top=170
OnClick=apagar
End Object
Object btn4 as Button
caption="Salvar"
left=10
top=170
End Object
End Object
Object stst as StatusBar
SimplePanel=True
End Object
showmodal
End Object
Sub calcular(s as Button)
dim str as String
str=combo.item(combo.itemindex)
lstbx.AddItem(str+" --> ")
lstbx.AddItem("")
End Sub
Sub calcular1(s as Button)
Dim str1 as String
str1=combo1.item(combo1.itemindex)
lstbx1.AddItem(str1)
lstbx1.AddItem("")
End Sub
Sub apagar(s as Button)
lstbx.Clear
lstbx1.Clear
End Sub
I need to pic the values of the second listbox and make a sum of all values and then make a division with the amount of days selected in the first listbox and finally show the result in the StatusBar, helppp
And need direction on how to save to .txt file the content of the two listbox?s.
Thanks :D
Object formulario as Form
BorderStyle=2
center
Height=300
Width=800
caption="M?dia semal e mensal das An?lises"
Object grupo as groupbox
height=100
top=10
left=10
Caption="Semana"
Object combo as ComboBox
Top=15
left=5
AddItem("Segunda-Feira")
AddItem("Ter?a-Feira")
AddItem("Quarta-Feira")
AddItem("Quinta-Feira")
AddItem("Sexta-Feira")
End Object
Object btn1 as Button
caption="Selecionar"
left=30
top=50
OnClick=calcular
End Object
End Object
Object grupo1 as groupbox
height=100
Top=120
Left=10
Caption="N? Pacientes"
Object combo1 as ComboBox
Top=15
Left=5
AddItem("1")
AddItem("2")
AddItem("3")
AddItem("4")
AddItem("5")
AddItem("6")
AddItem("7")
AddItem("8")
AddItem("9")
AddItem("10")
End Object
Object btn3 as Button
caption="Selecionar"
left=30
top=50
OnClick=calcular1
End Object
End Object
Object grupo2 as groupBox
left=200
Top=10
Height=210
Caption="Resultado"
Object lstbx as ListBox
Left=10
Top=15
Height=140
Width=90
End Object
Object lstbx1 as ListBox
Left=110
Top=15
Height=140
Width=70
End Object
Object btn2 as Button
caption="Apagar"
left=100
top=170
OnClick=apagar
End Object
Object btn4 as Button
caption="Salvar"
left=10
top=170
End Object
End Object
Object stst as StatusBar
SimplePanel=True
End Object
showmodal
End Object
Sub calcular(s as Button)
dim str as String
str=combo.item(combo.itemindex)
lstbx.AddItem(str+" --> ")
lstbx.AddItem("")
End Sub
Sub calcular1(s as Button)
Dim str1 as String
str1=combo1.item(combo1.itemindex)
lstbx1.AddItem(str1)
lstbx1.AddItem("")
End Sub
Sub apagar(s as Button)
lstbx.Clear
lstbx1.Clear
End Sub
I need to pic the values of the second listbox and make a sum of all values and then make a division with the amount of days selected in the first listbox and finally show the result in the StatusBar, helppp
And need direction on how to save to .txt file the content of the two listbox?s.
Thanks :D