На VB6 было :
- Код: Выделить всё
Pic1.Scale (0, 0)-(8, 8)
For i = 0 To 8
For j = i Mod 2 To 8 Step 2
Pic1.Line (j, i - 1)-(j + 1, i), vbBlack, BF
Next
Next
Сейчас у меня vbexpress .
Помогите ,пожалуйста, реализовать вышеупомянутый код
на vbexpress.
Pic1.Scale (0, 0)-(8, 8)
For i = 0 To 8
For j = i Mod 2 To 8 Step 2
Pic1.Line (j, i - 1)-(j + 1, i), vbBlack, BF
Next
Next
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim G As Graphics = Pic1.CreateGraphics
G.ScaleTransform(Pic1.ClientRectangle.Width / 8, Pic1.ClientRectangle.Height /
For i As Integer = 0 To 7
For j As Integer = i Mod 2 To 7 Step 2
G.FillRectangle(Brushes.Black, j, i, 1, 1)
Next
Next
G.Dispose()
End Sub
For i As Integer = 0 To 8
For j As Integer = i Mod 2 To 7 Step 2
G.FillRectangle(Brushes.Black, j, i - 1, 1, 1)
Next
Next
Nord777 писал(а):Шахматная доска чтоли?
- Код: Выделить всё
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim G As Graphics = Pic1.CreateGraphics
G.ScaleTransform(Pic1.ClientRectangle.Width / 8, Pic1.ClientRectangle.Height /
For i As Integer = 0 To 7
For j As Integer = i Mod 2 To 7 Step 2
G.FillRectangle(Brushes.Black, j, i, 1, 1)
Next
Next
G.Dispose()
End Sub
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 67