Faust писал(а):где-то на форуме была ссылка на полезную программу API Guide.
Juriev писал(а):Private Declare Function GetPicsel Lib "gdi32.dll" (ByVal hds As Long, ByVal x As Long, ByVal y As Long)
Private Sub pic_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Label1.Caption = GetPicsel(pic.hDC, x, y)
End Sub
'Сообщает - не могу найти точку входа в gdi32.dll
'Прошу помощи!!! Что в коде не так?
Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long) As Long
Dim PX As Long
Dim PY As Long
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
PX = X / Screen.TwipsPerPixelX
PY = Y / Screen.TwipsPerPixelY
If GetPixel(Me.hdc, PX, PY) = vbWhite Then
Me.Caption = "! White !"
Else
Me.Caption = "Another color"
End If
End Sub
Сейчас этот форум просматривают: AhrefsBot, Google-бот, Mail.ru [бот] и гости: 8