- 最後登錄
- 2010-4-10
- 在線時間
- 38 小時
- 註冊時間
- 2009-2-11
- 閱讀權限
- 30
- 精華
- 0
- UID
- 5824491
- 帖子
- 946
- 積分
- 2494 點
- 潛水值
- 9421 米
| 回覆中加入附件並不會使你增加積分,請使用主題方式發佈附件。 用偷吃步,效果是出來了啦,但是不實用.看來要想其它的方式了- Option Explicit
- Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
- Dim handle As Long
- Dim handle2 As Long
- Dim i, j As Integer
- Private Declare Function SetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
- Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
- Dim temp As Long
- Private Sub Command1_Click()
- handle = GetDC(Text1.hwnd)
- handle2 = GetDC(Text2.hwnd)
- Text1.Enabled = False
- For i = 0 To 100
- For j = 0 To 100
- temp = GetPixel(handle2, i, j)
- If temp <> -1 Then
- If i > 23 And i < 50 And temp = RGB(0, 0, 0) Then
- SetPixel handle, i, j, RGB(255, 0, 0)
- Else
- SetPixel handle, i, j, temp
- End If
- End If
-
- Next j
- Next i
- End Sub
複製代碼 ... |
|