Question

How to I model an array function to fit my script?

Asked by: seeminglylost

I am in the process of using a two-dimensional array to find wind chill factors.  My application uses a nudTemp for temperature and nudWind for Wind Velocity.  When temp and wind are chosen from the nud list, it is supposed to display the wind chill temp in a text box and then display a message box.  Right now it does everything it is supposed to do except that it does not display the proper wind chill factor.

I know it is an issue with my arrays so I was provided with an example but I don't know where it goes in my script or how to modify it so that it matches my code.

The example I was provided is:
[code]
      Private arr1 As Integer() = New Integer() {10, 20, 30}
      Private arr2 As Integer() = New Integer() {100, 200, 300}
      Private arr3 As Integer(,) = New Integer(,) {{1000, 2000, 3000}, {2000, 4000, 6000}, {3000, 6000, 9000}}
      Private Function GetVal3(ByVal val1 As Integer, ByVal val2 As Integer) As Integer
          Dim index1 As Integer = Array.Index(arr1, val1)
          Dim index2 As Integer = Array.Index(arr2, val2)
 
          If index1 <> -1 AndAlso index2 <> -1 Then
              Return arr3(index1, index2)
          End If
      End Function
[/code]

I am new to VB.net and we are on our second day of arrays so I am a little lost.  Any assistance would be greatly appreciated.

I have provided my code listed below.

Option Strict On
Public Class frmWindChill
 
    Dim intWindChill(7, 5) As Integer
    Dim intWind(5) As Integer
    Dim intTemp(7) As Integer
 
 
    Private Sub nudTemp_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nudTemp.ValueChanged
 
        intTemp(0) = -20
        intTemp(1) = -15
        intTemp(2) = -10
        intTemp(3) = -5
        intTemp(4) = 0
        intTemp(5) = 5
        intTemp(6) = 10
        intTemp(7) = 15
 
    End Sub
 
    Private Sub frmWindChill_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
    End Sub
 
    Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
 
        txtWindChill.Text = CStr(intWindChill(7, 5))
        MessageBox.Show("The WindChill Factor is:" & intWindChill(7, 5).ToString)
 
 
    End Sub
 
    Private Sub nudWind_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nudWind.ValueChanged
 
        intWind(0) = 5
        intWind(1) = 10
        intWind(2) = 15
        intWind(3) = 20
        intWind(4) = 25
        intWind(5) = 30
 
    End Sub
 
    Private Sub txtWindChill_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtWindChill.TextChanged
 
        intWindChill(0, 0) = -26
        intWindChill(0, 1) = -46
        intWindChill(0, 2) = -58
        intWindChill(0, 3) = -67
        intWindChill(0, 4) = -74
        intWindChill(0, 5) = -79
        intWindChill(1, 0) = -21
        intWindChill(1, 1) = -40
        intWindChill(1, 2) = -51
        intWindChill(1, 3) = -60
        intWindChill(1, 4) = -66
        intWindChill(1, 5) = -71
        intWindChill(2, 0) = -15
        intWindChill(2, 1) = -34
        intWindChill(2, 2) = -45
        intWindChill(2, 3) = -53
        intWindChill(2, 4) = -59
        intWindChill(2, 5) = -64
        intWindChill(3, 0) = -10
        intWindChill(3, 1) = -27
        intWindChill(3, 2) = -38
        intWindChill(3, 3) = -46
        intWindChill(3, 4) = -51
        intWindChill(3, 5) = -56
        intWindChill(4, 0) = -5
        intWindChill(4, 1) = -22
        intWindChill(4, 2) = -31
        intWindChill(4, 3) = -39
        intWindChill(4, 4) = -44
        intWindChill(4, 5) = -49
        intWindChill(5, 0) = 0
        intWindChill(5, 1) = -15
        intWindChill(5, 2) = -25
        intWindChill(5, 3) = -31
        intWindChill(5, 4) = -36
        intWindChill(5, 5) = -41
        intWindChill(6, 0) = 7
        intWindChill(6, 1) = -9
        intWindChill(6, 2) = -18
        intWindChill(6, 3) = -24
        intWindChill(6, 4) = -29
        intWindChill(6, 5) = -33
        intWindChill(7, 0) = 12
        intWindChill(7, 1) = -3
        intWindChill(7, 2) = -11
        intWindChill(7, 3) = -17
        intWindChill(7, 4) = -22
        intWindChill(7, 5) = -25
 
    End Sub
 
    Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReset.Click
        txtWindChill.Text = ""
    End Sub
End Class

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-10-26 at 18:50:35ID24845860
Tags

VB.net using Visual Studio 2005

Topics

Business Objects

,

.NET

,

Microsoft Visual Basic.Net

Participating Experts
3
Points
500
Comments
17

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. VB.Net, ByVal and ByRef
    Hi Experts, In VB.Net. When we should use ByVal and when use ByRef to pass an array to a Sub/Function? I have tested ByVal and ByRef and got the same results..... Thank you in advance.
  2. a math problem....java to vb.net - wind chill in metric
    can someone convert this to vb.net please its how to get wind chill from temp and wind speed in metric (i really need it in standerd (english)) but i can convert it if need be. thanks ------------ snip in java to vb.net please --------- Eolien = round(13.12 + 0.6215 * T...
  3. Excel Wind Direction Calculation
    I have a list of numbers that will either be 1-36 or 99 in cells c3:g3, 1-36 represents the general wind direction, (for example if 2 was in a cell, it would represent wind direction of 20 degrees, 24 in a cell, would represent wind direction of 240) I need to computer the a...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: roma2208Posted on 2009-10-26 at 21:37:24ID: 25669174

which control r u using for nudTemp?

 

by: roma2208Posted on 2009-10-26 at 21:54:46ID: 25669230

According to my understanding In UI i have one textbox in which i want to display the chill wind value, two buttons one for submit and one for reset. I have two combobox, one has datasource as Temp array and other has datasorce as wind array. According to the selected temp and wind value onclick of submit it will show you the chill wind value.

Try this code..

Public Class frmWindChill
    Dim intWindChill(7, 5) As Integer
    Dim intWind(5) As Integer
    Dim intTemp(7) As Integer 
    Sub getTemp()
        intTemp(0) = -20
        intTemp(1) = -15
        intTemp(2) = -10
        intTemp(3) = -5
        intTemp(4) = 0
        intTemp(5) = 5
        intTemp(6) = 10
        intTemp(7) = 15
    End Sub
    Sub getWind()
        intWind(0) = 5
        intWind(1) = 10
        intWind(2) = 15
        intWind(3) = 20
        intWind(4) = 25
        intWind(5) = 30
    End Sub
    Sub getWindChill()
        intWindChill(0, 0) = -26
        intWindChill(0, 1) = -46
        intWindChill(0, 2) = -58
        intWindChill(0, 3) = -67
        intWindChill(0, 4) = -74
        intWindChill(0, 5) = -79
        intWindChill(1, 0) = -21
        intWindChill(1, 1) = -40
        intWindChill(1, 2) = -51
        intWindChill(1, 3) = -60
        intWindChill(1, 4) = -66
        intWindChill(1, 5) = -71
        intWindChill(2, 0) = -15
        intWindChill(2, 1) = -34
        intWindChill(2, 2) = -45
        intWindChill(2, 3) = -53
        intWindChill(2, 4) = -59
        intWindChill(2, 5) = -64
        intWindChill(3, 0) = -10
        intWindChill(3, 1) = -27
        intWindChill(3, 2) = -38
        intWindChill(3, 3) = -46
        intWindChill(3, 4) = -51
        intWindChill(3, 5) = -56
        intWindChill(4, 0) = -5
        intWindChill(4, 1) = -22
        intWindChill(4, 2) = -31
        intWindChill(4, 3) = -39
        intWindChill(4, 4) = -44
        intWindChill(4, 5) = -49
        intWindChill(5, 0) = 0
        intWindChill(5, 1) = -15
        intWindChill(5, 2) = -25
        intWindChill(5, 3) = -31
        intWindChill(5, 4) = -36
        intWindChill(5, 5) = -41
        intWindChill(6, 0) = 7
        intWindChill(6, 1) = -9
        intWindChill(6, 2) = -18
        intWindChill(6, 3) = -24
        intWindChill(6, 4) = -29
        intWindChill(6, 5) = -33
        intWindChill(7, 0) = 12
        intWindChill(7, 1) = -3
        intWindChill(7, 2) = -11
        intWindChill(7, 3) = -17
        intWindChill(7, 4) = -22
        intWindChill(7, 5) = -25
    End Sub 
    Private Sub frmWindChill_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        getTemp()
        getWind()
        getWindChill()
        Me.ComboBox1.DataSource = intTemp
        Me.ComboBox2.DataSource = intWind
    End Sub 
    Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
        txtWindChill.Text = CStr(intWindChill(Me.ComboBox1.SelectedIndex, Me.ComboBox2.SelectedIndex))
        MessageBox.Show("The WindChill Factor is:" & intWindChill(Me.ComboBox1.SelectedIndex, Me.ComboBox2.SelectedIndex).ToString)
    End Sub
  
    Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReset.Click
        txtWindChill.Text = ""
    End Sub
End Class

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:

Select allOpen in new window

 

by: seeminglylostPosted on 2009-10-27 at 03:52:13ID: 25670866

I am using NumericUpDown controls for nudTemp and nudWind.

I tried your code and it is giving me the following errors:
 Error      1      'DataSource' is not a member of 'System.Windows.Forms.NumericUpDown'.
Error      3      'SelectedIndex' is not a member of 'System.Windows.Forms.NumericUpDown'.      

Help?

 

by: roma2208Posted on 2009-10-27 at 03:57:29ID: 25670898

what you want in numeric up down ?

 

by: roma2208Posted on 2009-10-27 at 03:59:14ID: 25670906

can u explain me the UI in detail what  you want to do so i can help you ?

 

by: seeminglylostPosted on 2009-10-27 at 04:09:02ID: 25670959

What I have is an application that has two NumericUpDown controls and one textbox.  As well, two buttons.  One submits and the other resets.

User chooses a temp from one NumericUpDown control and wind speed using the other control.  The user would then click on submit.  A corresponding wind chill factor should display in the textbox and then a Messagebox.Show() pops a message relating to the data in the textbox.

I am using Visual Studio 2005 and when I attempt to compile what you provided for code, I am getting the following errors:

Error      1      'DataSource' is not a member of 'System.Windows.Forms.NumericUpDown'.
Error      3      'SelectedIndex' is not a member of 'System.Windows.Forms.NumericUpDown'.      

Right now, anything that has 'DaaSource' or 'SelectedIndex' is causing errors.

 

by: seeminglylostPosted on 2009-10-27 at 04:11:25ID: 25670971

Sorry...I attached the incorrect screenshot.  This is the correct one.

 

by: roma2208Posted on 2009-10-27 at 04:12:56ID: 25670980

Yes my previous code will give you the error because you haven;t mentioned any thing about numeric updown so i have used combobox instead of NumericUpdown.
If you will use combobox instead of numUpDown it will not give you error.

 

by: seeminglylostPosted on 2009-10-27 at 04:17:16ID: 25671004

Could you review the code?  I have changed any values with ComboBox to NumericUpDown.

It is still giving the errors.

Option Strict On
Public Class frmWindChill
    Dim intWindChill(7, 5) As Integer
    Dim intWind(5) As Integer
    Dim intTemp(7) As Integer
    Sub getTemp()
        intTemp(0) = -20
        intTemp(1) = -15
        intTemp(2) = -10
        intTemp(3) = -5
        intTemp(4) = 0
        intTemp(5) = 5
        intTemp(6) = 10
        intTemp(7) = 15
    End Sub
    Sub getWind()
        intWind(0) = 5
        intWind(1) = 10
        intWind(2) = 15
        intWind(3) = 20
        intWind(4) = 25
        intWind(5) = 30
    End Sub
    Sub getWindChill()
        intWindChill(0, 0) = -26
        intWindChill(0, 1) = -46
        intWindChill(0, 2) = -58
        intWindChill(0, 3) = -67
        intWindChill(0, 4) = -74
        intWindChill(0, 5) = -79
        intWindChill(1, 0) = -21
        intWindChill(1, 1) = -40
        intWindChill(1, 2) = -51
        intWindChill(1, 3) = -60
        intWindChill(1, 4) = -66
        intWindChill(1, 5) = -71
        intWindChill(2, 0) = -15
        intWindChill(2, 1) = -34
        intWindChill(2, 2) = -45
        intWindChill(2, 3) = -53
        intWindChill(2, 4) = -59
        intWindChill(2, 5) = -64
        intWindChill(3, 0) = -10
        intWindChill(3, 1) = -27
        intWindChill(3, 2) = -38
        intWindChill(3, 3) = -46
        intWindChill(3, 4) = -51
        intWindChill(3, 5) = -56
        intWindChill(4, 0) = -5
        intWindChill(4, 1) = -22
        intWindChill(4, 2) = -31
        intWindChill(4, 3) = -39
        intWindChill(4, 4) = -44
        intWindChill(4, 5) = -49
        intWindChill(5, 0) = 0
        intWindChill(5, 1) = -15
        intWindChill(5, 2) = -25
        intWindChill(5, 3) = -31
        intWindChill(5, 4) = -36
        intWindChill(5, 5) = -41
        intWindChill(6, 0) = 7
        intWindChill(6, 1) = -9
        intWindChill(6, 2) = -18
        intWindChill(6, 3) = -24
        intWindChill(6, 4) = -29
        intWindChill(6, 5) = -33
        intWindChill(7, 0) = 12
        intWindChill(7, 1) = -3
        intWindChill(7, 2) = -11
        intWindChill(7, 3) = -17
        intWindChill(7, 4) = -22
        intWindChill(7, 5) = -25
    End Sub
    Private Sub frmWindChill_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        getTemp()
        getWind()
        getWindChill()
        Me.NumericUpDown1.DataSource = intTemp
        Me.NumericUpDown2.DataSource = intWind
    End Sub
    Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
        txtWindChill.Text = CStr(intWindChill(Me.NumericUpDown1.SelectedIndex, Me.NumericUpDown2.SelectedIndex))
        MessageBox.Show("The WindChill Factor is:" & intWindChill(Me.NumericUpDown1.SelectedIndex, Me.NumericUpDown2.SelectedIndex).ToString)
    End Sub
 
    Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReset.Click
        txtWindChill.Text = ""
    End Sub
 
    Private Sub NumericUpDown3_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
 
    End Sub
 
    Private Sub NumericUpDown1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NumericUpDown1.ValueChanged
 
    End Sub
End Class

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:

Select allOpen in new window

 

by: roma2208Posted on 2009-10-27 at 04:21:15ID: 25671034

First keep combobox on Ui and change their name as NumericUpDown1 and NumericUpDown2 and now check will it still giving error ?

 

by: CodeCruiserPosted on 2009-10-27 at 06:04:12ID: 25671903

I think there are much better ways of doing what you are trying to do. I think you can populate a DataTable with the values and then use a RowFilter to find the value you need.

 

by: roma2208Posted on 2009-10-27 at 06:11:27ID: 25671974

There may be so many way to do one thing but unless and untill you will not explain what you exactly want i can't help. Up till now i have given you the solution according to your code.

If you can tell me your requirement in details then i can help you more.

 

by: roma2208Posted on 2009-10-27 at 06:13:29ID: 25671989

On submit button click event you have written the static value in textbox like intWindChill(7, 5) .. what should be there exactly.??

 

by: bhmahlerPosted on 2009-10-27 at 06:29:35ID: 25672145

Do you have to use the array or can you use a formula?  There is a a formula for calculating windchill

    Private Function CalculateWindChill(ByVal Temperature As Integer, ByVal WindSpeed As Integer) As Integer
        If WindSpeed < 5 Then
            Return Temperature
        Else
            Return Math.Round((10.45 + (6.686112 * Math.Sqrt(WindSpeed)) - (0.44704 * WindSpeed)) / 22.034 * (Temperature - 91.4) + 91.4)
        End If
    End Function

                                              
1:
2:
3:
4:
5:
6:
7:

Select allOpen in new window

 

by: bhmahlerPosted on 2009-10-27 at 06:32:19ID: 25672165

Sorry, my bad, just read the last line in your question, didn't realize this was for a class.  Well, now you have the function to calculate wind chill :)

 

by: seeminglylostPosted on 2009-10-27 at 06:42:26ID: 25672276

roma2208:  The solution you provided works great using combo.box control.  What I would like to use is NumericUpDown controls instead of the combobox control.

CodeCruiser:  I am new to VB.Net so I am not familiar with creating DataTables.  Thanks for the input.

bhmahler: I am using an array to display the wind chill factor.  Thanks for the formula, I will save it as I know it will come in handy.

 

by: seeminglylostPosted on 2009-10-27 at 10:09:17ID: 31646244

Thanks!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...