Can not use a Sub using graphics

This is my code.

Sub Proces(ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim i, j As
Integer
For i = 0 To
200
For j = 0 To
200
If rd < alpha
Then
If grid(i, j) = 0
Then
grid(i, j) = 1
aantal = aantal + 1
e.Graphics.DrawRectangle(Pens.Beige, i + 10, j + TextBox1.Height, 1, 1)
End
If
End
If
Next
Next
rd = randomgen.NextDouble()
Label1.Text =
CStr
(rd)
E
nd Sub

I can not draw by using this. I need to draw a pixel in a procedure that is called when pressing on a button.

Can somebody please help me ( the error says that :Argument not specified for parameter 'e' of 'Public Sub Proces(e As System.Windows.Forms.PaintEventArgs)'. 



Answer this question

Can not use a Sub using graphics

  • David Razzetti

    Thanks man, I'm really new to VB and really didn't have a clue.

    Your a lifesaver !

     


  • RacinRan

     

    Woman..... :)



  • Jose A. M.

    Sub Proces(ByVal sender As Object,ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint

    One line.....

     

    Enjoy !




  • Can not use a Sub using graphics