Click here to Skip to main content
15,915,826 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionDesktop Apps with web UI?? Pin
aloaiza24-Oct-05 15:11
aloaiza24-Oct-05 15:11 
AnswerRe: Desktop Apps with web UI?? Pin
Christian Graus24-Oct-05 15:22
protectorChristian Graus24-Oct-05 15:22 
AnswerRe: Desktop Apps with web UI?? Pin
Joshua Quick24-Oct-05 15:39
Joshua Quick24-Oct-05 15:39 
Questiontreeview and listview Pin
andy3824-Oct-05 15:05
andy3824-Oct-05 15:05 
AnswerRe: treeview and listview Pin
Steve Pullan24-Oct-05 15:21
Steve Pullan24-Oct-05 15:21 
Questionproblems with control colors when set the 256 colors Pin
isgrom24-Oct-05 9:57
isgrom24-Oct-05 9:57 
AnswerRe: problems with control colors when set the 256 colors Pin
StewBob24-Oct-05 10:33
StewBob24-Oct-05 10:33 
QuestionMultiple item ComboBox? Pin
DCgamer24-Oct-05 8:32
DCgamer24-Oct-05 8:32 
Hello all,

I am a beginner to programming and VB.NET. I am designing a basic desktop application to do an activity calculation (radiochemistry). I am using comboboxes to store single lists of numbers that can be used in the calculation.
The problem I'm having is that I need to put in more data that has multiple attributes and I don't see any comboboxes
that allow me to do this. For instance;

This is the calculation I'm doing:
----------------------------------
Private Sub btnActivity_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnActivity.Click

'function for Thyroid activity calculation
'Z = a + be(cY) + d / y2
'A = G/Z
'A= # cts/(efficiency * Branching ratio * count time * energy)
'A = activity of thyroid in Bequerels, Bq
'G = gross counts in counts per second (cps)
'E = efficiency in units of counts per second per Bq (cps/Bq)

'Initial Activity / Final Activity = e - ln2 * t / t1/2

Dim a As Single
a = -0.45573288
Dim b As Single
b = 0.45656697
Dim c As Single
c = -0.00083964
Dim d As Single
d = -0.0002884

' ----------- thyroid efficiency calculation ------------------
Dim Efficiency As Double

Efficiency = a + (b * Exp(c * CDbl(txtHeight.Text))) _
+ d / (CDbl(txtHeight.Text) * CDbl(txtHeight.Text))

txtEfficiency.Text = Efficiency.ToString("0.000...E+00")
' -----------------------------------------------------
' ----------- thyroid activity calculation --------------------
Dim Activity As Single
Activity = (CDbl(txtCounts.Text) / (a + b * Exp(c * CDbl(txtHeight.Text)) _
+ d / (CDbl(txtHeight.Text) * CDbl(txtHeight.Text))) * CDbl(txtRatio.Text) * CDbl(txtCtime.Text) _
* CDbl(txtIsoenergy.text))

txtActivity.Text = Activity.ToString("0.000...E+00")
' -------------------------------------------------------------

I need a combobox that can list for me ... first an isotope of choice from others ie: I-131 (text value) then a corresponding energy 0.996 keV (a numeric value to be used in the calculation) and another number that corresponds to that energy, a branching ratio ... say 0.564, to also be used in the calculation. The other values come from text boxes that the user can input ie: person's height, weight, count time, counts etc. I would like the isotope information to come from one combobox (if possible??). There would be mulitple choices of isotopes to choose from with all there corresponding energies and branching ratios.

Is this possible to do this, is this the proper way to do this, or am I completely off base.

Any help would be greatly appreciated

Thanks Confused | :confused:
AnswerRe: Multiple item ComboBox? Pin
Greeky25-Oct-05 2:21
Greeky25-Oct-05 2:21 
Questionmps file format Pin
Anonymous24-Oct-05 7:15
Anonymous24-Oct-05 7:15 
Question.NET MODBUS component Pin
Dwayner7924-Oct-05 6:45
Dwayner7924-Oct-05 6:45 
AnswerRe: .NET MODBUS component Pin
Joshua Quick24-Oct-05 15:34
Joshua Quick24-Oct-05 15:34 
GeneralRe: .NET MODBUS component Pin
Dwayner7925-Oct-05 7:00
Dwayner7925-Oct-05 7:00 
QuestionRemote calls for a 3-Tier application Pin
Nito Jose24-Oct-05 3:55
Nito Jose24-Oct-05 3:55 
QuestionHow do I erase SQL Connections? Pin
Isobar24-Oct-05 2:18
Isobar24-Oct-05 2:18 
AnswerRe: How do I erase SQL Connections? Pin
rwestgraham24-Oct-05 9:09
rwestgraham24-Oct-05 9:09 
QuestionCancable DB-request Pin
evertbylt24-Oct-05 1:33
evertbylt24-Oct-05 1:33 
AnswerRe: Cancable DB-request Pin
S Douglas24-Oct-05 23:50
professionalS Douglas24-Oct-05 23:50 
GeneralRe: Cancable DB-request Pin
evertbylt25-Oct-05 2:46
evertbylt25-Oct-05 2:46 
GeneralRe: Cancable DB-request Pin
S Douglas25-Oct-05 3:27
professionalS Douglas25-Oct-05 3:27 
GeneralRe: Cancable DB-request Pin
evertbylt25-Oct-05 4:08
evertbylt25-Oct-05 4:08 
GeneralRe: Cancable DB-request Pin
S Douglas25-Oct-05 4:27
professionalS Douglas25-Oct-05 4:27 
QuestionTiny OS, with RFID and Network OS Pin
cloudking1196623-Oct-05 22:33
cloudking1196623-Oct-05 22:33 
QuestionTAPI Pin
kachonk23-Oct-05 20:24
kachonk23-Oct-05 20:24 
QuestionVB for Excel Pin
Niros8123-Oct-05 20:16
Niros8123-Oct-05 20:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.