Hello jpcar,
The "Point" command will allow you to read a pixel.
The "PSet" command will allow you to update a pixel.
I'd recommend setting up a subroutine you could call using X and Y parameters to reduce the amount of coding and debugging. Something like this:
'
' clockwise from upper left
'
ScanPoints(0,Picture.Width,1,0,0,0)
ScanPoints(Picture.Width,Picture.Width,0,0,Picture .Height,1)
ScanPoints(Picture.Width,0,-1,Picture.Height,Picture.Height,0)
ScanPoints(0,0,0,Picture.Height,0,-1)
'
' Routine
'
Public Sub ScanPoints(tmpXFrom as long, tmpXTo as long,
tmpXStep as long, tmpYFrom as long,
tmpYTo as long, tmpYStep as long)
'
' Left/right or Up/down
'
If tmpXStep = 0 then
for lclIndex=tmpYFrom to tmpYTo step tmpYStep
....Point(tmpXFrom,lclindex)....
....PSet(tmpXFrom,lclIndex)....
next
else
for lclIndex=tmpXFrom to tmpXTo step tmpXStep
....Point(lclindex,tmpYFrom)....
....PSet(lclindex,tmpYFrom)....
next
End If
End Sub
This isn't elegant or fast, but should put you in the ballpark.
If you need more information, here are some books that go into graphics:
Instant Visual Basic Animation
The Revolutionary Guide to Bitmapped Graphics
The Visual Basic Programmers Guide to the Win32 API
Good luck,