vb.net - application using graphics, only displays red X's over main window and control -
the code have interacts e.graphics is
'clear area e.graphics.fillrectangle(brushes.black, 0, 0, 600, 800) 'draw sand each in world e.graphics.fillrectangle(i.getcolor, i.getx, i.gety, 1, 1) next
here variable areas of 2 classes, along new functions; assume lines think do.
public class sand private x integer private y integer private type element public sub new(byval x integer, byval y integer, byval type element) me.x = x me.y = y me.type = type end sub public class element public color color public weight integer = 1 public spread double = 0.5 public text string = "null" public sub new(byval c color, byval w integer, byval s double, byval t string) color = c weight = w spread = s text = t end sub
here spot in program dimensions world variable , such.
private world list(of sand) private paused boolean = false private openbottom boolean = false private selected integer = 0 private elements list(of element) 'debug variables private debugmode boolean = true private framenum integer = 0
and here area in debug portion makes 4 grains of sand in 2 different elements.
elements.add(new element(color.azure, 1, 1, "test el 1")) elements.add(new element(color.aqua, 1, 1, "test el 2")) world.add(new sand(240, 400, elements(1))) world.add(new sand(440, 200, elements(1))) world.add(new sand(340, 100, elements(2))) world.add(new sand(540, 400, elements(1)))
a red x's on main window means custom drawing code launches exception. world null? i null?
Comments
Post a Comment