control.Draw([nCreate])

PurposeDraw the chart onto the screen
Parameter
nCreate (Boolean)TRUE (=default): create all internal structures new
FALSE: modify only internal structures which have changed
Return valueZero if successful or an element of the RMCError enumeration.
RemarksAfter setting all properties and data for your chart, call this method to show the chart. When you show the chart during runtime for the first time you must call Draw without parameter (or with TRUE). If you want to change any property or even data during the lifetime of the control's instance you have two choices for refreshing the chart:
  • Traverse the same code procedure as before (modified with the changed property/data), terminated with a call to Draw [TRUE]
  • Set only the new property/data and call Draw FALSE
There is one exception: If you want to alter any property of the control itself (BackColor, Style, Width or Height) during runtime you must reset the control and traverse the whole creation procedure as for the first time drwaing the chart, terminated with Draw [TRUE].
ExampleSee SUB mnTimer_Click() in the VB Demo Project for a demonstration how to change data 'on fly' and calling Draw FALSE every time after setting the new data.