Code center > Darwinbots Program Source Code

Sentence Split

<< < (9/27) > >>

Numsgil:
Try to be more specific about what didn't work and what the code looks like, etc.

And make sure you haev "Option explicit" at the top of your VB code.  It catches some programmign errors and forces you to be explicit with new variables, which is a good thing.

PurpleYouko:

--- Quote ---Graphico.CLS would sound about right from what PY has said.
--- End quote ---

Actually this would be extremely bad in this case since Grafico is the actual form. It has a bunch of other stuff on it too including the afore-mentioned rectangle.
All drawing in here is done directly onto the form itself rather than into a picturebox.

A general CLS would wipe the entire form.
It would be better to replace the rectangle shape with a picturebox then draw to it instead.

PurpleYouko:

--- Quote ---Have you done:

--- Code: ---formname.graphico.cls
--- End code ---
if you are coding in another form or module?
--- End quote ---
Shouldn't need to as Grafico is the form itself. This is the highest level object in VB

Ulciscor:
Oh right! Sorry I thought you meant grafico was a picturebox  :redface:

Zelos:
I tried using the "line" command to create lines on a picture box but it didnt work :( should I do something to the picture box or command?
the line code look like this
--- Code: ---Line (xo + Generationstepp * (N - 1), yo - Percentstepp * lastgene(1))-(xo + Generationstepp * N, yo - Percentstepp * Gene(1)), RGB(0, 100, 0)
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version