PDA

Click to See Complete Forum and Search --> : just want to paint pixels (fast)


itay222
Sep 14th, 2000, 06:24 AM
hi.
i come from the lovely world of assembler and screen draw in memory (you know, 0A000h, wait for retrace...)

anyhow, i would like to know how do i make this stuff in vb.
a simple (if there's any) code for the following "tasks" would be most appreciated:
1. change screen res
2. clear the screen
3. put pixel (x, y, color)
4. section 3, fast.

btw: using NT.

thanx, itay.

Sep 14th, 2000, 02:54 PM
The fastest way for Point 3 is

Public Declare Function SetPixel Lib "gdi32.dll" _
(ByVal hdc As Long, ByVal x As Long, ByVal y As Long, _
ByVal crColor As Long) As Long

but you you must scale the picturebox or else in vbPixel