Private Sub Form_Load()
Picture1.Line (300, 300)-(900, 600), vbBlue, B
Form1.Caption = FloodFill(Picture1.hdc, 400, 400, vbBlue)
Picture1.Refresh
End Sub
Picture1.AutoRedraw = True
Amed писал(а):FloodFill объявлен правильно? Код в студию.
Private Declare Function FloodFill Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
Private Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.BackColor = vbWhite
Picture1.Line (0, 0)-(800, 800), vbBlue, BF
Picture1.Line (100, 100)-(600, 600), vbRed, BF
Form1.Caption = FloodFill(Picture1.hdc, 400, 400, vbBlue)
End Sub
Zoomie писал(а):Amed писал(а):FloodFill объявлен правильно? Код в студию.
Да вроде:
- Код: Выделить всё
Private Declare Function FloodFill Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
Private Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.BackColor = vbWhite
Picture1.Line (0, 0)-(800, 800), vbBlue, BF
Picture1.Line (100, 100)-(600, 600), vbRed, BF
Form1.Caption = FloodFill(Picture1.hdc, 400, 400, vbBlue)
End Sub
Option Explicit
Private Declare Function FloodFill Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
Private Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.BackColor = vbWhite
Picture1.Line (0, 0)-(800, 800), vbBlue, BF
Picture1.Line (100, 100)-(600, 600), vbRed, BF
Picture1.FillStyle = vbFSSolid
Picture1.FillColor = vbYellow
Form1.Caption = FloodFill(Picture1.hdc, 27, 27, vbBlue)
End Sub
Zoomie писал(а):GSerg, нужно создавать кисть?
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 136