děkuji za pomoc tato rada mi také pomohla. Uloží se to sice, ale hned nevykreslído picture boxu (Name:PaintBox). Až po uložení do pictureboxu.
Private Sub PaintKvádr()
ODSA = Val(Odsazeni.Text)
KRESL = 2
A = Val(A2.Text)
B = Val(B2.Text)
C = Val(C2.Text)
G.Clear(Color.White)
G.DrawRectangle(Pens.Black, ODSA + A + C, ODSA, A, C)
G.DrawRectangle(Pens.Black, ODSA + A + C, ODSA + C, A, B)
G.DrawRectangle(Pens.Black, ODSA + A + C, ODSA + C + B, A, C)
G.DrawRectangle(Pens.Black, ODSA + A, ODSA + C, C, B)
G.DrawRectangle(Pens.Black, ODSA + A, ODSA + C, A, B)
G.DrawRectangle(Pens.Black, ODSA + A + C + A, ODSA + C, C, B)
End Sub
Private Sub PaintBox_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PaintBox.Paint
PaintKrychle()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
PaintKvádr()
End Sub
|