By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,234 Members | 1,877 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,234 IT Pros & Developers. It's quick & easy.

Graphics in visual basic 2010

P: 1
H, I began programming in visual basic few weeks ago and I am really getting along fast. I however want to plot two sets of values XY on a graph with logarithmic scale.I have created the arrays that stores the number as it is being inputed by the user using the inputbox. I have however not been able to scale the picturebox and also plot my desired graph. Anyhelp.... thanks

Expand|Select|Wrap|Line Numbers
  1.     Dim dataPoints As Integer
  2.     Dim X(50) As Single
  3.     Dim Y(50) As Single
  4.  
  5.  
  6.  
  7.  'To ensure that data entered do not exceed 50
  8.      dataPoints = Integer.Parse(TextBox1.Text)
  9.             If dataPoints > 50 Then
  10.                 MessageBox.Show("The data points chosen are too much for a typical well", "Excess data", MessageBoxButtons.OK, MessageBoxIcon.Error)
  11.  
  12.  
  13.  
  14.   'To enter the x values
  15.  
  16.         Try
  17.             Dim k As Integer
  18.             For k = 1 To dataPoints
  19.                 formFact(k) = InputBox(k)
  20.             Next
  21.  
  22.         Catch ex As Exception
  23.             MessageBox.Show("Enter only digits", "Invalid Input", MessageBoxButtons.OK, MessageBoxIcon.Warning)
  24.         End Try
  25.  
  26.  
  27.  
  28.  
  29.    'To enter Y values
  30.  
  31.         Try
  32.             Dim k As Integer
  33.             For k = 1 To dataPoints
  34.                 formFact(k) = InputBox(k)
  35.             Next
  36.  
  37.         Catch ex As Exception
  38.             MessageBox.Show("Enter only digits", "Invalid Input", MessageBoxButtons.OK, MessageBoxIcon.Warning)
  39.         End Try
May 19 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.