CodeItBetter Programming Another VB Programming Blog

How to change color in Picture Box

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'Graphics - How to change color in Picture Box

Option Explicit
 
'Add a PictureBox control and set its AutoRedraw property to True.

Declare Function SetPixel Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long, _
    ByVal crColor As Long) As Long
 
Private Sub Command1_Click()
    Dim s As Long
    s = SetPixel(Picture1.hdc, 10, 10, RGB(255, 0, 0))
    Picture1.Refresh
End Sub
Filed under: Graphics Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.