Im building a digital oscilloscope as a part of my education.
the gui and the graphic display of the signal are to be made in VB.Net.
I would like some tips about making the graphic display.
dont have to be so advanced, just an x-axis and an y-axis and then plot the signal. I have not that much experience of VB, so I would be Verry glad for help!!
Iceplug
07-27-2004, 06:21 AM
Tips?
Draw lines instead of points.
If you want to flip the graph to standard cartesian orientation, negate the Y value of the result and add some number to it.
Did you have a specific issue that you wanted someone to address?
Tips?
Draw lines instead of points.
If you want to flip the graph to standard cartesian orientation, negate the Y value of the result and add some number to it.
Did you have a specific issue that you wanted someone to address?
I realy am a novice, have only done simple things in VB before.
I just wonder how to create a Line Graph in VB.net, how to plot the signal in it is another problem. :) for now I would like a tutorial like http://www.xtremevbtalk.com/showthread.php?t=127331, but for VB.net.
if there is any kind people who know where I can find such a tutorial or have any other help for me I would be most greatful!
Iceplug
07-28-2004, 09:11 AM
Have you worked with the GDI+ Graphics objects in .NET before?
The first thing you would do is to setup your chart boundaries, and then try to just draw a line across the middle.
Have you worked with the GDI+ Graphics objects in .NET before?
The first thing you would do is to setup your chart boundaries, and then try to just draw a line across the middle.
have done some work with gdi+, and my plan was to use gdi+ graphics to create this graph aswell. but then I heard about some funktions i VB.net with almost complete graphs that you could use. Have you heard of any funktions like that? working with gdi+ is simple enough, but if I can find an already working graph implemented in VB that would be even more simple :)
thanks for your help and your patiens with this novice...
Iceplug
07-28-2004, 04:27 PM
I haven't heard of any functions in VB that can graph functions, but there is the MSChart control, although I haven't heard much about it within VB.NET.
how do I create a graph that changes in size when the window it lies on changes size?
so that the whole graph is vissible in the window even if I make the window smaler?
and that it grows and covers the whole window if I make the window larger.
I know that you can use anchor controll for example a textbox, but how do I do with the graph, that consists of lines and strings made with GDI+?
Iceplug
07-29-2004, 07:07 AM
You just have to do your drawing relative to the boundaries of the graph.
For example:
To draw X and Y axes on a graph, you'd do something like this using the width and height of the panel.
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
e.Graphics.DrawLine(Pens.Black, Me.Width / 2.0F, 0.0F, Me.Width / 2.0F, Me.Height)
e.Graphics.DrawLine(Pens.Black, 0.0F, Me.Height / 2.0F, Me.Width, Me.Height / 2.0F)
End Sub
:)