I did as you suggested. Now the plot flashes up temperarily in the picbox,
then it gets cleared. Any idea what I could be doing wrong, or have set
wrong?
"Herfried K. Wagner [MVP]" wrote:
> "Mark Lancaster" <(E-Mail Removed)> schrieb:
> > I have a form that displays a time vs temperature graph when the user
> > clicks
> > a plot button. The plot is done in a picturebox using gr.drawline. I
> > would
> > like for this plot to be made without the user having to click the plot
> > button, ie when the form opens.
> >
> > I have tried putting the call to the plotting subroutine in various
> > places:
> > the pbox.paint event, the form load event, and several other form events.
> > Nothing seems to work - I am not getting an error, just no graph. If I
> > click
> > the button, it will still plot.
> >
> > Any ideas how I might get this to automatically occur when the form opens?
>
>
> Perform the calculation in the form's 'Load' event handler, store the data
> in a data structure and draw the graph in the form's 'Paint' event handler
> or overridden 'OnPaint' method.
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://classicvb.org/petition/>
>
>
|