I'm trying to figure out how to make a dynamically scaling/resizing 2d chart on a form as my 1st trip into graphics. Most 3rd party addons/DLLs are of no use to me as the bank I work for is unlikely to allow any of those to be used in my projects.
I want the chart to stay at the bottom of the form no matter if it's sized larger or smaller. It's not working properly on shrink or grow of the form.
Also I have no idea how to use the vbCode button on these forums it asks for a highlight option.Code:Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint Const width As Integer = 10 Dim heights() As Integer = {10, 0, 30, 60} Dim bottom As Integer = CInt(e.Graphics.VisibleClipBounds.Bottom) For index As Integer = 0 To heights.Length - 1 e.Graphics.DrawRectangle(Pens.Black, New Rectangle(index * width _ , bottom - heights(index) - 1, width, bottom)) Next End Sub


Reply With Quote


