Click here to Skip to main content
15,913,941 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Issue with XML file Pin
Steve Pullan28-Feb-06 18:56
Steve Pullan28-Feb-06 18:56 
GeneralRe: Issue with XML file Pin
mayhem_rules28-Feb-06 22:02
mayhem_rules28-Feb-06 22:02 
GeneralRe: Issue with XML file Pin
Steve Pullan1-Mar-06 12:50
Steve Pullan1-Mar-06 12:50 
QuestionRemote Shutdown Pin
chrysler_vergara_m27-Feb-06 18:51
chrysler_vergara_m27-Feb-06 18:51 
AnswerRe: Remote Shutdown Pin
illusionFinder28-Feb-06 1:53
illusionFinder28-Feb-06 1:53 
QuestionWeb Connection Blocked Pin
huckeuri27-Feb-06 18:45
huckeuri27-Feb-06 18:45 
QuestionHow to generate crystal reports by passing parameter indirectly? Pin
jkrao27-Feb-06 18:15
jkrao27-Feb-06 18:15 
Questionconversion help...... Pin
ss65432127-Feb-06 16:05
ss65432127-Feb-06 16:05 
i using zedgraph to load the date and value from the database(access), to order to convert to double data type, i'm using ToOADate function but eventually my date has become a number such as 33200, can anyone tell me how to convert date to double so it can works n Zedgraph?
Below is the code i use...
Imports System
Imports System.Data
Imports System.Data.OleDb
Public Class Form2
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents zgc As ZedGraph.ZedGraphControl
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.zgc = New ZedGraph.ZedGraphControl
Me.SuspendLayout()
'
'zgc
'
Me.zgc.IsAutoScrollRange = False
Me.zgc.IsEnableHPan = True
Me.zgc.IsEnableHZoom = True
Me.zgc.IsEnableVPan = True
Me.zgc.IsEnableVZoom = True
Me.zgc.IsScrollY2 = False
Me.zgc.IsShowContextMenu = True
Me.zgc.IsShowCursorValues = False
Me.zgc.IsShowHScrollBar = False
Me.zgc.IsShowPointValues = False
Me.zgc.IsShowVScrollBar = False
Me.zgc.IsZoomOnMouseCenter = False
Me.zgc.Location = New System.Drawing.Point(72, 24)
Me.zgc.Name = "zgc"
Me.zgc.PanButtons = System.Windows.Forms.MouseButtons.Left
Me.zgc.PanButtons2 = System.Windows.Forms.MouseButtons.Middle
Me.zgc.PanModifierKeys2 = System.Windows.Forms.Keys.None
Me.zgc.PointDateFormat = "g"
Me.zgc.PointValueFormat = "G"
Me.zgc.ScrollMaxX = 0
Me.zgc.ScrollMaxY = 0
Me.zgc.ScrollMaxY2 = 0
Me.zgc.ScrollMinX = 0
Me.zgc.ScrollMinY = 0
Me.zgc.ScrollMinY2 = 0
Me.zgc.Size = New System.Drawing.Size(392, 208)
Me.zgc.TabIndex = 0
Me.zgc.ZoomButtons = System.Windows.Forms.MouseButtons.Left
Me.zgc.ZoomButtons2 = System.Windows.Forms.MouseButtons.None
Me.zgc.ZoomModifierKeys = System.Windows.Forms.Keys.None
Me.zgc.ZoomModifierKeys2 = System.Windows.Forms.Keys.None
Me.zgc.ZoomStepFraction = 0.1
'
'Form2
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(632, 266)
Me.Controls.Add(Me.zgc)
Me.Name = "Form2"
Me.Text = "Form2"
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim myConnection As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"DATA SOURCE=C:\Documents and Settings\Administrator\My Documents\Plantation.mdb;User Id='admin';Password='';")
Dim mySelectQuery As String = "SELECT Date,Last FROM Maxis"
Dim myCommand As New OleDbCommand(mySelectQuery, myConnection)
myConnection.Open()
Dim myReader As OleDbDataReader
myReader = myCommand.ExecuteReader()

Dim junk As ZedGraph.ZedGraphControl
junk = zgc
junk.GraphPane.Title = "Test Case for VB"
junk.IsShowPointValues = True
Dim x(100) As Double
Dim y(100) As Double
Dim i As Integer
' Randomize()


For i = 1 To 100
myReader.Read()
MessageBox.Show((myReader.GetDateTime(0)).ToOADate)
x(i) = (myReader.GetDateTime(0)).ToOADate
y(i) = myReader.GetDouble(1)
Next


junk.GraphPane.AddCurve("Sine Wave", x, y, Color.Blue, ZedGraph.SymbolType.XCross)
junk.GraphPane.AxisFill = New ZedGraph.Fill(Color.White, Color.LightGoldenrodYellow)
junk.AxisChange()

' always call Close when done reading.
myReader.Close()
' Close the connection when done with it.
myConnection.Close()
End Sub

Private Sub zgc_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles zgc.Load

End Sub
End Class


sdasasd
QuestionVB6 XML String parse Pin
Rahman Mahmoodi27-Feb-06 15:56
Rahman Mahmoodi27-Feb-06 15:56 
AnswerRe: VB6 XML String parse Pin
Christian Graus27-Feb-06 16:16
protectorChristian Graus27-Feb-06 16:16 
QuestionDeterming elapsed time... Pin
Nobelium27-Feb-06 12:33
Nobelium27-Feb-06 12:33 
AnswerRe: Determing elapsed time... Pin
Guffa27-Feb-06 13:17
Guffa27-Feb-06 13:17 
Questionstarting interactive process from windows service Pin
Qaiser_Iftikhar27-Feb-06 10:21
Qaiser_Iftikhar27-Feb-06 10:21 
Questionamstextbox and VS 2005 Pin
CanuteM27-Feb-06 9:56
CanuteM27-Feb-06 9:56 
QuestionReportViewer not displaying footer info? Pin
Rashar27-Feb-06 9:48
Rashar27-Feb-06 9:48 
AnswerRe: ReportViewer not displaying footer info? Pin
noshaba mariam27-Feb-06 17:41
noshaba mariam27-Feb-06 17:41 
GeneralRe: ReportViewer not displaying footer info? Pin
Rashar28-Feb-06 2:01
Rashar28-Feb-06 2:01 
GeneralRe: ReportViewer not displaying footer info? Pin
noshaba mariam28-Feb-06 17:41
noshaba mariam28-Feb-06 17:41 
GeneralRe: ReportViewer not displaying footer info? Pin
Rashar1-Mar-06 6:15
Rashar1-Mar-06 6:15 
QuestionPrintting fucntion Pin
mbyahya27-Feb-06 9:11
mbyahya27-Feb-06 9:11 
AnswerRe: Printting fucntion Pin
Divya Rathi28-Feb-06 19:09
Divya Rathi28-Feb-06 19:09 
Questionaccess a folder using administrator account Pin
Omar Mallat27-Feb-06 9:03
professionalOmar Mallat27-Feb-06 9:03 
QuestionHow to post Datagrid back to access table Pin
New_Coder27-Feb-06 6:44
New_Coder27-Feb-06 6:44 
AnswerRe: How to post Datagrid back to access table Pin
noshaba mariam27-Feb-06 17:49
noshaba mariam27-Feb-06 17:49 
QuestionForm created by thread not responding Pin
RJGCarey27-Feb-06 6:42
RJGCarey27-Feb-06 6:42 

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.