Hello,
I'm fairly new to VB 2010 but very familiar with programming in other languages. I'm trying to make a quick application but I'm at a stand still. I know it's something simple but I've searched around and I may have found the answer but because I don't understand the problem I'll never know. So here goes.
I'm not at my programming station at the moment so I'm going to be very general with my example. Here's what I want to do:
So basically the while loop never executes when I click the button. This obviously isn't the exact code, but it's an idea of what I'm trying to do.Code:dim doonce as Int16 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) { doonce = 1 } Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs) bm as new bitmap while(doonce = 1) { bm.clearcolor(white) bm.setpixel(0,0(black)) } End Sub
basically when you click the button, it refreshes the bitmap and sets a pixel. In the final code, the pixel position will increment each time you click the button.




Reply With Quote